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

Bump nightly to nightly-2024-05-05 #6538

Merged
merged 23 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from 12 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
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ freebsd_instance:
image_family: freebsd-14-0
env:
RUST_STABLE: stable
RUST_NIGHTLY: nightly-2023-10-21
RUST_NIGHTLY: nightly-2024-05-05
RUSTFLAGS: -D warnings

# Test FreeBSD in a full VM on cirrus-ci.com. Test the i686 target too, in the
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:
RUST_BACKTRACE: 1
# Change to specific Rust release to pin
rust_stable: stable
rust_nightly: nightly-2023-10-21
rust_nightly: nightly-2024-05-05
Darksonn marked this conversation as resolved.
Show resolved Hide resolved
rust_clippy: '1.77'
# When updating this, also update:
# - README.md
Expand Down Expand Up @@ -995,6 +995,23 @@ jobs:
run: cargo check-external-types --all-features
working-directory: tokio

check-unexpected-lints-cfgs:
name: check unexpected lints and cfgs
needs: basics
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ env.rust_nightly }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.rust_nightly }}
- name: don't allow warnings
run: sed -i '/#!\[allow(unknown_lints, unexpected_cfgs)\]/d' */src/lib.rs */tests/*.rs
- name: check for unknown lints and cfgs
run: cargo check --all-features --tests
env:
RUSTFLAGS: -Dwarnings --check-cfg=cfg(loom, tokio_unstable, tokio_taskdump, fuzzing, mio_unsupported_force_poll_poll, tokio_internal_mt_counters, fs, tokio_no_parking_lot) -Funexpected_cfgs -Funknown_lints

check-fuzzing:
name: check-fuzzing
needs: basics
Expand Down
1 change: 1 addition & 0 deletions tokio-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![allow(clippy::needless_doctest_main)]
#![warn(
missing_debug_implementations,
Expand Down
1 change: 1 addition & 0 deletions tokio-stream/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![allow(
clippy::cognitive_complexity,
clippy::large_enum_variant,
Expand Down
1 change: 1 addition & 0 deletions tokio-test/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(
missing_debug_implementations,
missing_docs,
Expand Down
1 change: 0 additions & 1 deletion tokio-util/src/codec/length_delimited.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,6 @@ mod builder {
impl LengthFieldType for u64 {}

#[cfg(any(
target_pointer_width = "8",
target_pointer_width = "16",
target_pointer_width = "32",
target_pointer_width = "64",
Expand Down
1 change: 1 addition & 0 deletions tokio-util/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![allow(clippy::needless_doctest_main)]
#![warn(
missing_debug_implementations,
Expand Down
1 change: 1 addition & 0 deletions tokio-util/tests/task_join_map.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "rt", tokio_unstable))]

Expand Down
9 changes: 3 additions & 6 deletions tokio/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![allow(
clippy::cognitive_complexity,
clippy::large_enum_variant,
Expand Down Expand Up @@ -446,13 +447,9 @@
// least 32 bits, which a lot of components in Tokio currently assumes.
//
// TODO: improve once we have MSRV access to const eval to make more flexible.
#[cfg(not(any(
target_pointer_width = "32",
target_pointer_width = "64",
target_pointer_width = "128"
)))]
#[cfg(not(any(target_pointer_width = "32", target_pointer_width = "64")))]
compile_error! {
"Tokio requires the platform pointer width to be 32, 64, or 128 bits"
"Tokio requires the platform pointer width to be at least 32 bits"
}

#[cfg(all(
Expand Down
2 changes: 2 additions & 0 deletions tokio/tests/_require_full.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(unknown_lints, unexpected_cfgs)]

#[cfg(not(any(feature = "full", target_family = "wasm")))]
compile_error!("run main Tokio tests with `--features full`");

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/dump.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![cfg(all(
tokio_unstable,
tokio_taskdump,
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/macros_select.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![cfg(feature = "macros")]
#![allow(clippy::disallowed_names)]

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/rt_basic.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/rt_common.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![allow(clippy::needless_range_loop)]
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/rt_handle.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/rt_metrics.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", tokio_unstable, not(target_os = "wasi")))]

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/rt_threaded.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", not(target_os = "wasi")))]

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/rt_threaded_alt.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", not(target_os = "wasi")))]
#![cfg(tokio_unstable)]
Expand Down
2 changes: 2 additions & 0 deletions tokio/tests/task_abort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ use tokio::time::Duration;

use tokio::runtime::Builder;

#[cfg(panic = "unwind")]
struct PanicOnDrop;

#[cfg(panic = "unwind")]
impl Drop for PanicOnDrop {
fn drop(&mut self) {
panic!("Well what did you expect would happen...");
Expand Down
2 changes: 2 additions & 0 deletions tokio/tests/task_builder.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(unknown_lints, unexpected_cfgs)]

#[cfg(all(tokio_unstable, feature = "tracing"))]
mod tests {
use std::rc::Rc;
Expand Down
1 change: 1 addition & 0 deletions tokio/tests/task_id.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", tokio_unstable))]

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/task_join_set.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/task_local_set.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![warn(rust_2018_idioms)]
#![cfg(feature = "full")]

Expand Down
1 change: 1 addition & 0 deletions tokio/tests/task_yield_now.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unknown_lints, unexpected_cfgs)]
#![cfg(all(feature = "full", tokio_unstable))]

use tokio::task;
Expand Down
Loading