Skip to content

Commit a28ac5b

Browse files
committed
Revert "Always set #![no_std]"
This reverts commit 4a53c9b. This caused a build error on Rust 1.40. ``` error[E0433]: failed to resolve: could not find `poll_with_tls_context` in `future` error[E0433]: failed to resolve: could not find `from_generator` in `future` error: aborting due to 2 previous errors ```
1 parent 39132f2 commit a28ac5b

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

src/future.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ use core::task::{Context, Poll};
5454
pub fn block_on<T>(future: impl Future<Output = T>) -> T {
5555
use std::cell::RefCell;
5656
use std::task::Waker;
57-
use std::thread_local;
5857

5958
use parking::Parker;
6059
use waker_fn::waker_fn;

src/io.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,14 @@ pub use std::io::{Error, ErrorKind, Result, SeekFrom};
2020
#[doc(no_inline)]
2121
pub use futures_io::{AsyncBufRead, AsyncRead, AsyncSeek, AsyncWrite};
2222

23-
use std::boxed::Box;
2423
use std::cmp;
2524
use std::fmt;
2625
use std::future::Future;
2726
use std::io::{IoSlice, IoSliceMut};
2827
use std::mem;
2928
use std::pin::Pin;
30-
use std::string::String;
3129
use std::sync::{Arc, Mutex};
3230
use std::task::{Context, Poll};
33-
use std::vec;
34-
use std::vec::Vec;
3531

3632
use futures_core::stream::Stream;
3733
use pin_project_lite::pin_project;

src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
//! ```
2323
2424
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
25-
#![no_std]
25+
#![cfg_attr(not(feature = "std"), no_std)]
2626
#![allow(clippy::needless_borrow)] // suggest code that doesn't work on MSRV
2727

28-
#[cfg(feature = "std")]
29-
extern crate std;
30-
3128
#[cfg(feature = "std")]
3229
#[doc(no_inline)]
3330
pub use crate::io::{

0 commit comments

Comments
 (0)