From 9269048ade575ab3f13903682efbad5185126155 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Sun, 19 May 2024 15:30:57 +0900 Subject: [PATCH 1/4] White-list custom cfgs for unexpected_cfgs lint --- Cargo.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 8582ba1e2..19f7fab5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,5 +63,11 @@ members = [ missing_debug_implementations = "warn" rust_2018_idioms = "warn" single_use_lifetimes = "warn" +unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(crossbeam_loom)', + 'cfg(crossbeam_no_atomic)', + 'cfg(crossbeam_sanitize)', + 'cfg(crossbeam_sanitize_thread)', +] } unreachable_pub = "warn" # unsafe_op_in_unsafe_fn = "warn" # Set at crate-level instead since https://github.com/rust-lang/rust/pull/100081 is not available on MSRV From edc6dbc4fcd2097ad08260fd3e63ea1352e8c533 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Sun, 19 May 2024 15:54:57 +0900 Subject: [PATCH 2/4] Trigger ci... From 79c1a6c43dbc5248bbf0289958ff31f8d25a4cf0 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Sun, 19 May 2024 16:12:33 +0900 Subject: [PATCH 3/4] Fix the careful job with a workaround ref: https://github.com/RalfJung/cargo-careful/issues/31 --- ci/careful.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/careful.sh b/ci/careful.sh index dffe2e734..ec668ae11 100755 --- a/ci/careful.sh +++ b/ci/careful.sh @@ -3,6 +3,9 @@ set -euxo pipefail IFS=$'\n\t' cd "$(dirname "$0")"/.. -export RUSTFLAGS="${RUSTFLAGS:-} -Z randomize-layout" +# TODO: Use the system's default linker instead of rust-lld, which recently +# became the default until this cargo-careful bug is fixed: +# https://github.com/RalfJung/cargo-careful/issues/31 +export RUSTFLAGS="${RUSTFLAGS:-} -Z randomize-layout -Z linker-features=-lld" cargo careful test --all --all-features --exclude benchmarks -- --test-threads=1 From 8a0b0557738fd04430cc7e22f30cfa021f5d95e5 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Sun, 19 May 2024 16:22:28 +0900 Subject: [PATCH 4/4] Improve TODO wording --- ci/careful.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/careful.sh b/ci/careful.sh index ec668ae11..7913d3f7f 100755 --- a/ci/careful.sh +++ b/ci/careful.sh @@ -3,9 +3,9 @@ set -euxo pipefail IFS=$'\n\t' cd "$(dirname "$0")"/.. -# TODO: Use the system's default linker instead of rust-lld, which recently -# became the default until this cargo-careful bug is fixed: -# https://github.com/RalfJung/cargo-careful/issues/31 +# TODO: Once cargo-careful's bug (https://github.com/RalfJung/cargo-careful/issues/31) is fixed, +# stop reverting back to the system's default linker, instead of rust-lld, which became the new +# default on linux recently (nightly-2024-05-18 and onwards). export RUSTFLAGS="${RUSTFLAGS:-} -Z randomize-layout -Z linker-features=-lld" cargo careful test --all --all-features --exclude benchmarks -- --test-threads=1