Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes too make the CI green #2885

Merged
merged 7 commits into from
Sep 14, 2024
10 changes: 5 additions & 5 deletions futures-core/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ pub trait Stream {
/// stream state:
///
/// - `Poll::Pending` means that this stream's next value is not ready
/// yet. Implementations will ensure that the current task will be notified
/// when the next value may be ready.
/// yet. Implementations will ensure that the current task will be notified
/// when the next value may be ready.
///
/// - `Poll::Ready(Some(val))` means that the stream has successfully
/// produced a value, `val`, and may produce further values on subsequent
/// `poll_next` calls.
/// produced a value, `val`, and may produce further values on subsequent
/// `poll_next` calls.
///
/// - `Poll::Ready(None)` means that the stream has terminated, and
/// `poll_next` should not be invoked again.
/// `poll_next` should not be invoked again.
///
/// # Panics
///
Expand Down
1 change: 0 additions & 1 deletion futures-executor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
))]
#![warn(missing_docs, unsafe_op_in_unsafe_fn)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![allow(clippy::thread_local_initializer_can_be_made_const)] // clippy bug: this lint doesn't consider MSRV

#[cfg(feature = "std")]
extern crate std;
Expand Down
4 changes: 2 additions & 2 deletions futures-util/src/abortable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<T> Abortable<T> {
/// This means that it will return `true` even if:
/// * `abort` was called after the task had completed.
/// * `abort` was called while the task was being polled - the task may still be running and
/// will not be stopped until `poll` returns.
/// will not be stopped until `poll` returns.
pub fn is_aborted(&self) -> bool {
self.inner.aborted.load(Ordering::Relaxed)
}
Expand Down Expand Up @@ -200,7 +200,7 @@ impl AbortHandle {
/// even if:
/// * `abort` was called after the task had completed.
/// * `abort` was called while the task was being polled - the task may still be running and
/// will not be stopped until `poll` returns.
/// will not be stopped until `poll` returns.
///
/// This operation has a Relaxed ordering.
pub fn is_aborted(&self) -> bool {
Expand Down
2 changes: 2 additions & 0 deletions futures-util/src/async_await/select_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
macro_rules! document_select_macro {
// This branch is required for `futures 0.3.1`, from before select_biased was introduced
($select:item) => {
#[allow(clippy::too_long_first_doc_paragraph)]
/// Polls multiple futures and streams simultaneously, executing the branch
/// for the future that finishes first. If multiple futures are ready,
/// one will be pseudo-randomly selected at runtime. Futures directly
Expand Down Expand Up @@ -153,6 +154,7 @@ macro_rules! document_select_macro {
($select:item $select_biased:item) => {
document_select_macro!($select);

#[allow(clippy::too_long_first_doc_paragraph)]
/// Polls multiple futures and streams simultaneously, executing the branch
/// for the future that finishes first. Unlike [`select!`], if multiple futures are ready,
/// one will be selected in order of declaration. Futures directly
Expand Down
1 change: 1 addition & 0 deletions futures-util/src/async_await/stream_select_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#[doc(hidden)]
pub use futures_macro::stream_select_internal;

#[allow(clippy::too_long_first_doc_paragraph)]
/// Combines several streams, all producing the same `Item` type, into one stream.
/// This is similar to `select_all` but does not require the streams to all be the same type.
/// It also keeps the streams inline, and does not require `Box<dyn Stream>`s to be allocated.
Expand Down
1 change: 1 addition & 0 deletions futures-util/src/compat/compat03as01.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use futures_sink::Sink as Sink03;
use std::marker::PhantomData;
use std::{mem, pin::Pin, sync::Arc, task::Context};

#[allow(clippy::too_long_first_doc_paragraph)] // clippy bug, see https://github.com/rust-lang/rust-clippy/issues/13315
/// Converts a futures 0.3 [`TryFuture`](futures_core::future::TryFuture) or
/// [`TryStream`](futures_core::stream::TryStream) into a futures 0.1
/// [`Future`](futures_01::future::Future) or
Expand Down
1 change: 0 additions & 1 deletion futures-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
)
))]
#![warn(missing_docs, unsafe_op_in_unsafe_fn)]
#![cfg_attr(feature = "write-all-vectored", feature(io_slice_advance))]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![allow(clippy::needless_borrow)] // https://github.com/rust-lang/futures-rs/pull/2558#issuecomment-1030745203
#![allow(clippy::arc_with_non_send_sync)] // false positive https://github.com/rust-lang/rust-clippy/issues/11076
Expand Down
1 change: 1 addition & 0 deletions futures-util/src/stream/select_with_strategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ pin_project! {
}
}

#[allow(clippy::too_long_first_doc_paragraph)]
/// This function will attempt to pull items from both streams. You provide a
/// closure to tell [`SelectWithStrategy`] which stream to poll. The closure can
/// store state on `SelectWithStrategy` to which it will receive a `&mut` on every
Expand Down
2 changes: 1 addition & 1 deletion futures-util/src/stream/stream/flatten_unordered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl SharedPollState {
/// - `!WAKING` as
/// * Wakers called during the `POLLING` phase won't propagate their calls
/// * `POLLING` phase can't start if some of the wakers are active
/// So no wrapped waker can touch the inner waker's cell, it's safe to poll again.
/// So no wrapped waker can touch the inner waker's cell, it's safe to poll again.
fn stop_polling(&self, to_poll: u8, will_be_woken: bool) -> u8 {
self.state
.fetch_update(Ordering::SeqCst, Ordering::SeqCst, |mut value| {
Expand Down
3 changes: 3 additions & 0 deletions futures/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("cargo:rustc-check-cfg=cfg(futures_sanitizer)");
hkratz marked this conversation as resolved.
Show resolved Hide resolved
}
1 change: 1 addition & 0 deletions futures/tests/no-std/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::{env, process::Command};

fn main() {
println!("cargo:rustc-check-cfg=cfg(nightly)");
if is_nightly() {
println!("cargo:rustc-cfg=nightly");
}
Expand Down