Add test for multiple defined msrv attrs

This commit is contained in:
flip1995 2020-11-25 12:19:42 +01:00
parent 93f922a858
commit d06076c0c5
No known key found for this signature in database
GPG key ID: 1CA0DF2AF59D68A5
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,11 @@
#![feature(custom_inner_attributes)]
#![clippy::msrv = "1.40"]
#![clippy::msrv = "=1.35.0"]
#![clippy::msrv = "1.10.1"]
mod foo {
#![clippy::msrv = "1"]
#![clippy::msrv = "1.0.0"]
}
fn main() {}

View file

@ -0,0 +1,38 @@
error: `msrv` is defined multiple times
--> $DIR/min_rust_version_multiple_inner_attr.rs:3:1
|
LL | #![clippy::msrv = "=1.35.0"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first definition found here
--> $DIR/min_rust_version_multiple_inner_attr.rs:2:1
|
LL | #![clippy::msrv = "1.40"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: `msrv` is defined multiple times
--> $DIR/min_rust_version_multiple_inner_attr.rs:4:1
|
LL | #![clippy::msrv = "1.10.1"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first definition found here
--> $DIR/min_rust_version_multiple_inner_attr.rs:2:1
|
LL | #![clippy::msrv = "1.40"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: `msrv` is defined multiple times
--> $DIR/min_rust_version_multiple_inner_attr.rs:8:5
|
LL | #![clippy::msrv = "1.0.0"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: first definition found here
--> $DIR/min_rust_version_multiple_inner_attr.rs:7:5
|
LL | #![clippy::msrv = "1"]
| ^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 3 previous errors