Skip to content

Commit d06076c

Browse files
committed
Add test for multiple defined msrv attrs
1 parent 93f922a commit d06076c

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![feature(custom_inner_attributes)]
2+
#![clippy::msrv = "1.40"]
3+
#![clippy::msrv = "=1.35.0"]
4+
#![clippy::msrv = "1.10.1"]
5+
6+
mod foo {
7+
#![clippy::msrv = "1"]
8+
#![clippy::msrv = "1.0.0"]
9+
}
10+
11+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
error: `msrv` is defined multiple times
2+
--> $DIR/min_rust_version_multiple_inner_attr.rs:3:1
3+
|
4+
LL | #![clippy::msrv = "=1.35.0"]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: first definition found here
8+
--> $DIR/min_rust_version_multiple_inner_attr.rs:2:1
9+
|
10+
LL | #![clippy::msrv = "1.40"]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: `msrv` is defined multiple times
14+
--> $DIR/min_rust_version_multiple_inner_attr.rs:4:1
15+
|
16+
LL | #![clippy::msrv = "1.10.1"]
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18+
|
19+
note: first definition found here
20+
--> $DIR/min_rust_version_multiple_inner_attr.rs:2:1
21+
|
22+
LL | #![clippy::msrv = "1.40"]
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
24+
25+
error: `msrv` is defined multiple times
26+
--> $DIR/min_rust_version_multiple_inner_attr.rs:8:5
27+
|
28+
LL | #![clippy::msrv = "1.0.0"]
29+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
|
31+
note: first definition found here
32+
--> $DIR/min_rust_version_multiple_inner_attr.rs:7:5
33+
|
34+
LL | #![clippy::msrv = "1"]
35+
| ^^^^^^^^^^^^^^^^^^^^^^
36+
37+
error: aborting due to 3 previous errors
38+

0 commit comments

Comments
 (0)