Skip to content

Commit

Permalink
Ignore incompatible_msrv clippy false positives in test
Browse files Browse the repository at this point in the history
rust-lang/rust-clippy#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
  • Loading branch information
dtolnay committed Feb 10, 2024
1 parent e32c81e commit b00df38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion benches/xid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions tests/compare.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#![allow(
clippy::incompatible_msrv, // https://github.com/rust-lang/rust-clippy/issues/12257
)]

mod fst;
mod roaring;
mod trie;
Expand Down

0 comments on commit b00df38

Please sign in to comment.