add uitests for cargo rust-version field
This commit is contained in:
parent
6384765665
commit
f0a1cd5645
33 changed files with 278 additions and 0 deletions
11
tests/ui-cargo/cargo_rust_version/fail_both_same/src/main.rs
Normal file
11
tests/ui-cargo/cargo_rust_version/fail_both_same/src/main.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#![deny(clippy::use_self)]
|
||||
|
||||
pub struct Foo;
|
||||
|
||||
impl Foo {
|
||||
pub fn bar() -> Foo {
|
||||
Foo
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
error: unnecessary structure name repetition
|
||||
--> $DIR/main.rs:6:21
|
||||
|
|
||||
LL | pub fn bar() -> Foo {
|
||||
| ^^^ help: use the applicable keyword: `Self`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/main.rs:1:9
|
||||
|
|
||||
LL | #![deny(clippy::use_self)]
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue