Always set #![no_std]

This commit is contained in:
Taiki Endo 2022-09-01 22:36:24 +09:00
parent d8011b30ef
commit 4a53c9b238
3 changed files with 9 additions and 1 deletions

View File

@ -54,6 +54,7 @@ use core::task::{Context, Poll};
pub fn block_on<T>(future: impl Future<Output = T>) -> T {
use std::cell::RefCell;
use std::task::Waker;
use std::thread_local;
use parking::Parker;
use waker_fn::waker_fn;

View File

@ -20,14 +20,18 @@ pub use std::io::{Error, ErrorKind, Result, SeekFrom};
#[doc(no_inline)]
pub use futures_io::{AsyncBufRead, AsyncRead, AsyncSeek, AsyncWrite};
use std::boxed::Box;
use std::cmp;
use std::fmt;
use std::future::Future;
use std::io::{IoSlice, IoSliceMut};
use std::mem;
use std::pin::Pin;
use std::string::String;
use std::sync::{Arc, Mutex};
use std::task::{Context, Poll};
use std::vec;
use std::vec::Vec;
use futures_core::stream::Stream;
use pin_project_lite::pin_project;

View File

@ -22,9 +22,12 @@
//! ```
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
#![cfg_attr(not(feature = "std"), no_std)]
#![no_std]
#![allow(clippy::needless_borrow)] // suggest code that doesn't work on MSRV
#[cfg(feature = "std")]
extern crate std;
// TODO: These hidden re-exports are deprecated and should eventually be removed.
#[cfg(feature = "std")]
#[doc(hidden)]