Skip to content

Commit 2a0df5f

Browse files
authored
ci: bump nightly to nightly-2024-05-05 (tokio-rs#6538)
1 parent b652a4e commit 2a0df5f

29 files changed

+77
-18
lines changed

.cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ freebsd_instance:
44
image_family: freebsd-14-0
55
env:
66
RUST_STABLE: stable
7-
RUST_NIGHTLY: nightly-2023-10-21
7+
RUST_NIGHTLY: nightly-2024-05-05
88
RUSTFLAGS: -D warnings
99

1010
# Test FreeBSD in a full VM on cirrus-ci.com. Test the i686 target too, in the

.github/workflows/ci.yml

+18-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515
RUST_BACKTRACE: 1
1616
# Change to specific Rust release to pin
1717
rust_stable: stable
18-
rust_nightly: nightly-2023-10-21
18+
rust_nightly: nightly-2024-05-05
1919
rust_clippy: '1.77'
2020
# When updating this, also update:
2121
# - README.md
@@ -995,6 +995,23 @@ jobs:
995995
run: cargo check-external-types --all-features
996996
working-directory: tokio
997997

998+
check-unexpected-lints-cfgs:
999+
name: check unexpected lints and cfgs
1000+
needs: basics
1001+
runs-on: ubuntu-latest
1002+
steps:
1003+
- uses: actions/checkout@v4
1004+
- name: Install Rust ${{ env.rust_nightly }}
1005+
uses: dtolnay/rust-toolchain@master
1006+
with:
1007+
toolchain: ${{ env.rust_nightly }}
1008+
- name: don't allow warnings
1009+
run: sed -i '/#!\[allow(unknown_lints, unexpected_cfgs)\]/d' */src/lib.rs */tests/*.rs
1010+
- name: check for unknown lints and cfgs
1011+
run: cargo check --all-features --tests
1012+
env:
1013+
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,tokio_no_tuning_tests) -Funexpected_cfgs -Funknown_lints
1014+
9981015
check-fuzzing:
9991016
name: check-fuzzing
10001017
needs: basics

target-specs/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
This is used for the `no-atomic-u64-test` ci check that verifies that Tokio
2+
works even if the `AtomicU64` type is missing.
3+
4+
When increasing the nightly compiler version, you may need to regenerate this
5+
target using the following command:
6+
```
7+
rustc +nightly -Z unstable-options --print target-spec-json --target i686-unknown-linux-gnu | grep -v 'is-builtin' | sed 's/"max-atomic-width": 64/"max-atomic-width": 32/' > target-specs/i686-unknown-linux-gnu.json
8+
```
9+

target-specs/i686-unknown-linux-gnu.json

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
{
22
"arch": "x86",
33
"cpu": "pentium4",
4+
"crt-objects-fallback": "false",
45
"crt-static-respected": true,
5-
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128",
6+
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
67
"dynamic-linking": true,
78
"env": "gnu",
89
"has-rpath": true,
910
"has-thread-local": true,
11+
"linker-flavor": "gnu-cc",
1012
"llvm-target": "i686-unknown-linux-gnu",
1113
"max-atomic-width": 32,
14+
"metadata": {
15+
"description": null,
16+
"host_tools": null,
17+
"std": null,
18+
"tier": null
19+
},
1220
"os": "linux",
1321
"position-independent-executables": true,
1422
"pre-link-args": {
15-
"gcc": [
23+
"gnu-cc": [
24+
"-m32"
25+
],
26+
"gnu-lld-cc": [
1627
"-m32"
1728
]
1829
},
1930
"relro-level": "full",
2031
"stack-probes": {
21-
"kind": "inline-or-call",
22-
"min-llvm-version-for-inline": [
23-
16,
24-
0,
25-
0
26-
]
32+
"kind": "inline"
2733
},
2834
"supported-sanitizers": [
2935
"address"

tokio-macros/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![allow(clippy::needless_doctest_main)]
23
#![warn(
34
missing_debug_implementations,

tokio-stream/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![allow(
23
clippy::cognitive_complexity,
34
clippy::large_enum_variant,

tokio-test/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![warn(
23
missing_debug_implementations,
34
missing_docs,

tokio-util/src/codec/length_delimited.rs

-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,6 @@ mod builder {
639639
impl LengthFieldType for u64 {}
640640

641641
#[cfg(any(
642-
target_pointer_width = "8",
643642
target_pointer_width = "16",
644643
target_pointer_width = "32",
645644
target_pointer_width = "64",

tokio-util/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![allow(clippy::needless_doctest_main)]
23
#![warn(
34
missing_debug_implementations,

tokio-util/tests/task_join_map.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![warn(rust_2018_idioms)]
23
#![cfg(all(feature = "rt", tokio_unstable))]
34

tokio/src/lib.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![allow(
23
clippy::cognitive_complexity,
34
clippy::large_enum_variant,
@@ -446,13 +447,9 @@
446447
// least 32 bits, which a lot of components in Tokio currently assumes.
447448
//
448449
// TODO: improve once we have MSRV access to const eval to make more flexible.
449-
#[cfg(not(any(
450-
target_pointer_width = "32",
451-
target_pointer_width = "64",
452-
target_pointer_width = "128"
453-
)))]
450+
#[cfg(not(any(target_pointer_width = "32", target_pointer_width = "64")))]
454451
compile_error! {
455-
"Tokio requires the platform pointer width to be 32, 64, or 128 bits"
452+
"Tokio requires the platform pointer width to be at least 32 bits"
456453
}
457454

458455
#[cfg(all(

tokio/src/signal/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
use crate::sync::watch::Receiver;
4646
use std::task::{Context, Poll};
4747

48+
#[cfg(feature = "signal")]
4849
mod ctrl_c;
50+
#[cfg(feature = "signal")]
4951
pub use ctrl_c::ctrl_c;
5052

5153
pub(crate) mod registry;

tokio/src/signal/unix.rs

+2
Original file line numberDiff line numberDiff line change
@@ -485,10 +485,12 @@ impl Signal {
485485
}
486486

487487
// Work around for abstracting streams internally
488+
#[cfg(feature = "process")]
488489
pub(crate) trait InternalStream {
489490
fn poll_recv(&mut self, cx: &mut Context<'_>) -> Poll<Option<()>>;
490491
}
491492

493+
#[cfg(feature = "process")]
492494
impl InternalStream for Signal {
493495
fn poll_recv(&mut self, cx: &mut Context<'_>) -> Poll<Option<()>> {
494496
self.poll_recv(cx)

tokio/tests/_require_full.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
2+
13
#[cfg(not(any(feature = "full", target_family = "wasm")))]
24
compile_error!("run main Tokio tests with `--features full`");
35

tokio/tests/dump.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![cfg(all(
23
tokio_unstable,
34
tokio_taskdump,

tokio/tests/fs_open_options.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,13 @@ async fn open_options_create_new() {
5555
#[tokio::test]
5656
#[cfg(unix)]
5757
async fn open_options_mode() {
58+
let mode = format!("{:?}", OpenOptions::new().mode(0o644));
5859
// TESTING HACK: use Debug output to check the stored data
59-
assert!(format!("{:?}", OpenOptions::new().mode(0o644)).contains("mode: 420 "));
60+
assert!(
61+
mode.contains("mode: 420 ") || mode.contains("mode: 0o000644 "),
62+
"mode is: {}",
63+
mode
64+
);
6065
}
6166

6267
#[tokio::test]

tokio/tests/macros_select.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![cfg(feature = "macros")]
23
#![allow(clippy::disallowed_names)]
34

tokio/tests/rt_basic.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![warn(rust_2018_idioms)]
23
#![cfg(feature = "full")]
34

tokio/tests/rt_common.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![allow(clippy::needless_range_loop)]
23
#![warn(rust_2018_idioms)]
34
#![cfg(feature = "full")]

tokio/tests/rt_handle.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![warn(rust_2018_idioms)]
23
#![cfg(feature = "full")]
34

tokio/tests/rt_metrics.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![warn(rust_2018_idioms)]
23
#![cfg(all(feature = "full", tokio_unstable, not(target_os = "wasi")))]
34

tokio/tests/rt_threaded.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![warn(rust_2018_idioms)]
23
#![cfg(all(feature = "full", not(target_os = "wasi")))]
34

tokio/tests/rt_threaded_alt.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![warn(rust_2018_idioms)]
23
#![cfg(all(feature = "full", not(target_os = "wasi")))]
34
#![cfg(tokio_unstable)]

tokio/tests/task_abort.rs

+2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ use tokio::time::Duration;
77

88
use tokio::runtime::Builder;
99

10+
#[cfg(panic = "unwind")]
1011
struct PanicOnDrop;
1112

13+
#[cfg(panic = "unwind")]
1214
impl Drop for PanicOnDrop {
1315
fn drop(&mut self) {
1416
panic!("Well what did you expect would happen...");

tokio/tests/task_builder.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![cfg(all(tokio_unstable, feature = "tracing"))]
23

34
use std::rc::Rc;

tokio/tests/task_id.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![warn(rust_2018_idioms)]
23
#![cfg(all(feature = "full", tokio_unstable))]
34

tokio/tests/task_join_set.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![warn(rust_2018_idioms)]
23
#![cfg(feature = "full")]
34

tokio/tests/task_local_set.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![warn(rust_2018_idioms)]
23
#![cfg(feature = "full")]
34

tokio/tests/task_yield_now.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(unknown_lints, unexpected_cfgs)]
12
#![cfg(all(feature = "full", tokio_unstable))]
23

34
use tokio::task;

0 commit comments

Comments
 (0)