Skip to content

Commit 69c6fa3

Browse files
Update error message to be clearer
1 parent fb77402 commit 69c6fa3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

clippy_lints/src/incompatible_msrv.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl IncompatibleMsrv {
9999
INCOMPATIBLE_MSRV,
100100
span,
101101
&format!(
102-
"current MSRV is `{}` but this item is stable since `{version}`",
102+
"current MSRV (Minimum Supported Rust Version) is `{}` but this item is stable since `{version}`",
103103
self.msrv
104104
),
105105
);

tests/ui/incompatible_msrv.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ fn foo() {
1313
assert_eq!(map.entry("poneyland").key(), &"poneyland");
1414
if let Entry::Vacant(v) = map.entry("poneyland") {
1515
v.into_key();
16-
//~^ ERROR: MSRV is `1.3.0` but this item is stable since `1.12.0`
16+
//~^ ERROR: is `1.3.0` but this item is stable since `1.12.0`
1717
}
1818
// Should warn for `sleep` but not for `Duration` (which was added in `1.3.0`).
1919
sleep(Duration::new(1, 0));
20-
//~^ ERROR: MSRV is `1.3.0` but this item is stable since `1.4.0`
20+
//~^ ERROR: is `1.3.0` but this item is stable since `1.4.0`
2121
}
2222

2323
fn main() {}

tests/ui/incompatible_msrv.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: current MSRV is `1.3.0` but this item is stable since `1.10.0`
1+
error: current MSRV (Minimum Supported Rust Version) is `1.3.0` but this item is stable since `1.10.0`
22
--> $DIR/incompatible_msrv.rs:13:39
33
|
44
LL | assert_eq!(map.entry("poneyland").key(), &"poneyland");
@@ -7,13 +7,13 @@ LL | assert_eq!(map.entry("poneyland").key(), &"poneyland");
77
= note: `-D clippy::incompatible-msrv` implied by `-D warnings`
88
= help: to override `-D warnings` add `#[allow(clippy::incompatible_msrv)]`
99

10-
error: current MSRV is `1.3.0` but this item is stable since `1.12.0`
10+
error: current MSRV (Minimum Supported Rust Version) is `1.3.0` but this item is stable since `1.12.0`
1111
--> $DIR/incompatible_msrv.rs:15:11
1212
|
1313
LL | v.into_key();
1414
| ^^^^^^^^^^
1515

16-
error: current MSRV is `1.3.0` but this item is stable since `1.4.0`
16+
error: current MSRV (Minimum Supported Rust Version) is `1.3.0` but this item is stable since `1.4.0`
1717
--> $DIR/incompatible_msrv.rs:19:5
1818
|
1919
LL | sleep(Duration::new(1, 0));

0 commit comments

Comments
 (0)