From b00df38d6fa298239607e637d77799b52815a43a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 9 Feb 2024 19:08:15 -0800 Subject: [PATCH] Ignore incompatible_msrv clippy false positives in test https://github.com/rust-lang/rust-clippy/issues/12257 warning: current MSRV (Minimum Supported Rust Version) is `1.31.0` but this item is stable since `1.57.0` --> tests/fst/mod.rs:5:44 | 5 | fst::Set::from(fst::raw::Fst::new(data.as_slice()).unwrap()) | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv = note: `-W clippy::incompatible-msrv` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::incompatible_msrv)]` warning: current MSRV (Minimum Supported Rust Version) is `1.31.0` but this item is stable since `1.57.0` --> tests/fst/mod.rs:10:44 | 10 | fst::Set::from(fst::raw::Fst::new(data.as_slice()).unwrap()) | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv warning: current MSRV (Minimum Supported Rust Version) is `1.31.0` but this item is stable since `1.32.0` --> tests/compare.rs:46:48 | 46 | xid_start_fst.contains((ch as u32).to_be_bytes()), | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv warning: current MSRV (Minimum Supported Rust Version) is `1.31.0` but this item is stable since `1.32.0` --> tests/compare.rs:51:51 | 51 | xid_continue_fst.contains((ch as u32).to_be_bytes()), | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv warning: current MSRV (Minimum Supported Rust Version) is `1.31.0` but this item is stable since `1.32.0` --> benches/xid.rs:88:44 | 88 | let ch_bytes = (ch as u32).to_be_bytes(); | ^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv --- benches/xid.rs | 5 ++++- tests/compare.rs | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/benches/xid.rs b/benches/xid.rs index 040c4e1..a141444 100644 --- a/benches/xid.rs +++ b/benches/xid.rs @@ -12,7 +12,10 @@ // readme is computed by subtracting this baseline from the other bench // functions' time, then dividing by one million (ms -> ns). -#![allow(clippy::needless_pass_by_value)] +#![allow( + clippy::incompatible_msrv, // https://github.com/rust-lang/rust-clippy/issues/12257 + clippy::needless_pass_by_value, +)] #[path = "../tests/fst/mod.rs"] mod fst; diff --git a/tests/compare.rs b/tests/compare.rs index 14ee22f..b2d1c05 100644 --- a/tests/compare.rs +++ b/tests/compare.rs @@ -1,3 +1,7 @@ +#![allow( + clippy::incompatible_msrv, // https://github.com/rust-lang/rust-clippy/issues/12257 +)] + mod fst; mod roaring; mod trie;