Skip to content

Commit 830b891

Browse files
Rename incompatible_msrv lint into incompatible_minimum_rust_version
1 parent 69c6fa3 commit 830b891

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

clippy_lints/src/declared_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ pub(crate) static LINTS: &[&crate::LintInfo] = &[
212212
crate::implicit_saturating_add::IMPLICIT_SATURATING_ADD_INFO,
213213
crate::implicit_saturating_sub::IMPLICIT_SATURATING_SUB_INFO,
214214
crate::implied_bounds_in_impls::IMPLIED_BOUNDS_IN_IMPLS_INFO,
215-
crate::incompatible_msrv::INCOMPATIBLE_MSRV_INFO,
215+
crate::incompatible_msrv::INCOMPATIBLE_MINIMUM_RUST_VERSION_INFO,
216216
crate::inconsistent_struct_constructor::INCONSISTENT_STRUCT_CONSTRUCTOR_INFO,
217217
crate::index_refutable_slice::INDEX_REFUTABLE_SLICE_INFO,
218218
crate::indexing_slicing::INDEXING_SLICING_INFO,

clippy_lints/src/incompatible_msrv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ declare_clippy_lint! {
3333
/// To fix this problem, either increase your MSRV or use another item
3434
/// available in your current MSRV.
3535
#[clippy::version = "1.77.0"]
36-
pub INCOMPATIBLE_MSRV,
36+
pub INCOMPATIBLE_MINIMUM_RUST_VERSION,
3737
suspicious,
3838
"ensures that all items used in the crate are available for the current MSRV"
3939
}
@@ -43,7 +43,7 @@ pub struct IncompatibleMsrv {
4343
is_above_msrv: FxHashMap<DefId, RustcVersion>,
4444
}
4545

46-
impl_lint_pass!(IncompatibleMsrv => [INCOMPATIBLE_MSRV]);
46+
impl_lint_pass!(IncompatibleMsrv => [INCOMPATIBLE_MINIMUM_RUST_VERSION]);
4747

4848
impl IncompatibleMsrv {
4949
pub fn new(msrv: Msrv) -> Self {
@@ -96,7 +96,7 @@ impl IncompatibleMsrv {
9696
fn emit_lint_for(&self, cx: &LateContext<'_>, span: Span, version: RustcVersion) {
9797
span_lint(
9898
cx,
99-
INCOMPATIBLE_MSRV,
99+
INCOMPATIBLE_MINIMUM_RUST_VERSION,
100100
span,
101101
&format!(
102102
"current MSRV (Minimum Supported Rust Version) is `{}` but this item is stable since `{version}`",

tests/ui/incompatible_msrv.stderr

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1+
error: unknown lint: `clippy::incompatible_msrv`
2+
--> $DIR/incompatible_msrv.rs:1:9
3+
|
4+
LL | #![warn(clippy::incompatible_msrv)]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: `-D unknown-lints` implied by `-D warnings`
8+
= help: to override `-D warnings` add `#[allow(unknown_lints)]`
9+
110
error: current MSRV (Minimum Supported Rust Version) is `1.3.0` but this item is stable since `1.10.0`
211
--> $DIR/incompatible_msrv.rs:13:39
312
|
413
LL | assert_eq!(map.entry("poneyland").key(), &"poneyland");
514
| ^^^^^
615
|
7-
= note: `-D clippy::incompatible-msrv` implied by `-D warnings`
8-
= help: to override `-D warnings` add `#[allow(clippy::incompatible_msrv)]`
16+
= note: `-D clippy::incompatible-minimum-rust-version` implied by `-D warnings`
17+
= help: to override `-D warnings` add `#[allow(clippy::incompatible_minimum_rust_version)]`
918

1019
error: current MSRV (Minimum Supported Rust Version) is `1.3.0` but this item is stable since `1.12.0`
1120
--> $DIR/incompatible_msrv.rs:15:11
@@ -19,5 +28,5 @@ error: current MSRV (Minimum Supported Rust Version) is `1.3.0` but this item is
1928
LL | sleep(Duration::new(1, 0));
2029
| ^^^^^
2130

22-
error: aborting due to 3 previous errors
31+
error: aborting due to 4 previous errors
2332

0 commit comments

Comments
 (0)