Skip to content

Commit

Permalink
Ignore buggy clippy::incompatible_msrv lint
Browse files Browse the repository at this point in the history
This lint doesn't consider cfg.

```
error: current MSRV (Minimum Supported Rust Version) is `1.34.0` but this item is stable since `1.45.0`
     --> src\imp\core_atomic.rs:314:32
      |
  314 |                     self.inner.fetch_max(val, order)
      |                                ^^^^^^^^^^^^^^^^^^^^^
  ...
  415 | atomic_int!(AtomicIsize, isize);
      | ------------------------------- in this macro invocation
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
      = note: `-D clippy::incompatible-msrv` implied by `-D warnings`
      = help: to override `-D warnings` add `#[allow(clippy::incompatible_msrv)]`
      = note: this error originates in the macro `atomic_int` (in Nightly builds, run with -Z macro-backtrace for more info)
```
  • Loading branch information
taiki-e committed Feb 22, 2024
1 parent f4a8d70 commit 0a940d7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ jobs:
flags: -Z codegen-backend=cranelift
- rust: nightly-2024-02-05 # TODO: core_simd bug https://github.com/rust-lang/portable-simd/pull/396
target: aarch64_be-unknown-linux-gnu
flags: -A unknown_lints # TODO: buggy clippy::incompatible_msrv lint is not available on nightly-2024-02-05, so unknown_lints also need to be allowed.
- rust: stable
target: aarch64-unknown-linux-musl
- rust: stable
Expand Down
1 change: 1 addition & 0 deletions bench/benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
internal_features,
unused_extern_crates,
clippy::duplicate_mod,
clippy::incompatible_msrv, // https://github.com/rust-lang/rust-clippy/issues/12257
clippy::inline_always,
clippy::naive_bytecount,
clippy::only_used_in_recursion,
Expand Down
3 changes: 3 additions & 0 deletions portable-atomic-util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ See [#1] for other primitives being considered for addition to this crate.
clippy::std_instead_of_alloc,
clippy::std_instead_of_core,
)]
#![allow(
clippy::incompatible_msrv, // false positive: this lint doesn't consider cfg
)]
// docs.rs only
#![cfg_attr(portable_atomic_doc_cfg, feature(doc_cfg))]

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ RUSTFLAGS="--cfg portable_atomic_no_outline_atomics" cargo ...
#![cfg_attr(not(portable_atomic_no_asm), warn(missing_docs))] // module-level #![allow(missing_docs)] doesn't work for macros on old rustc
#![allow(
clippy::cast_lossless,
clippy::incompatible_msrv, // false positive: this lint doesn't consider cfg
clippy::inline_always,
clippy::naive_bytecount,
clippy::unreadable_literal
Expand Down
1 change: 1 addition & 0 deletions tests/helper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![no_std]
#![allow(
missing_debug_implementations,
clippy::incompatible_msrv,
clippy::missing_panics_doc,
clippy::thread_local_initializer_can_be_made_const, // clippy bug: this lint doesn't consider MSRV
clippy::undocumented_unsafe_blocks
Expand Down

0 comments on commit 0a940d7

Please sign in to comment.