mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-22 19:13:29 +00:00
7aebe3a690
SelfType const and suggestion
40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
error: unnecessary structure name repetition
|
|
--> $DIR/use_self.rs:13:21
|
|
|
|
|
13 | fn new() -> Foo {
|
|
| ^^^ help: use the applicable keyword: `Self`
|
|
|
|
|
= note: `-D use-self` implied by `-D warnings`
|
|
|
|
error: unnecessary structure name repetition
|
|
--> $DIR/use_self.rs:14:13
|
|
|
|
|
14 | Foo {}
|
|
| ^^^ help: use the applicable keyword: `Self`
|
|
|
|
error: unnecessary structure name repetition
|
|
--> $DIR/use_self.rs:16:22
|
|
|
|
|
16 | fn test() -> Foo {
|
|
| ^^^ help: use the applicable keyword: `Self`
|
|
|
|
error: unnecessary structure name repetition
|
|
--> $DIR/use_self.rs:17:13
|
|
|
|
|
17 | Foo::new()
|
|
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
|
|
|
error: unnecessary structure name repetition
|
|
--> $DIR/use_self.rs:22:25
|
|
|
|
|
22 | fn default() -> Foo {
|
|
| ^^^ help: use the applicable keyword: `Self`
|
|
|
|
error: unnecessary structure name repetition
|
|
--> $DIR/use_self.rs:23:13
|
|
|
|
|
23 | Foo::new()
|
|
| ^^^^^^^^ help: use the applicable keyword: `Self`
|
|
|
|
error: aborting due to 6 previous errors
|
|
|