mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 14:38:46 +00:00
Add test for multiple defined msrv attrs
This commit is contained in:
parent
93f922a858
commit
d06076c0c5
2 changed files with 49 additions and 0 deletions
11
tests/ui/min_rust_version_multiple_inner_attr.rs
Normal file
11
tests/ui/min_rust_version_multiple_inner_attr.rs
Normal 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() {}
|
38
tests/ui/min_rust_version_multiple_inner_attr.stderr
Normal file
38
tests/ui/min_rust_version_multiple_inner_attr.stderr
Normal 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
|
||||
|
Loading…
Add table
Reference in a new issue