Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions futures-core/src/future.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ mod if_alloc {
}
}

#[cfg(feature = "std")]
impl<F: FusedFuture> FusedFuture for std::panic::AssertUnwindSafe<F> {
impl<F: FusedFuture> FusedFuture for core::panic::AssertUnwindSafe<F> {
fn is_terminated(&self) -> bool {
<F as FusedFuture>::is_terminated(&**self)
}
Expand Down
2 changes: 0 additions & 2 deletions futures-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@

#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;
Copy link
Member

@taiki-e taiki-e Jan 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary to generate the appropriate error if the user accidentally enables the std feature.

Otherwise, we may run into trouble with users who accidentally rely on the fact that currently we are not using std and get angry that their builds are broken during future patch releases.


pub mod future;
#[doc(no_inline)]
Expand Down
3 changes: 1 addition & 2 deletions futures-core/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ mod if_alloc {
}
}

#[cfg(feature = "std")]
impl<S: Stream> Stream for std::panic::AssertUnwindSafe<S> {
impl<S: Stream> Stream for core::panic::AssertUnwindSafe<S> {
type Item = S::Item;

fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<S::Item>> {
Expand Down
2 changes: 0 additions & 2 deletions futures-sink/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;

use core::ops::DerefMut;
use core::pin::Pin;
Expand Down
Loading