1
1
error: unnecessary structure name repetition
2
- --> $DIR/use_self.rs:15:13
2
+ --> $DIR/use_self.rs:14:21
3
3
|
4
- LL | Foo {}
5
- | ^^^ help: use the applicable keyword: `Self`
4
+ LL | fn new() -> Foo {
5
+ | ^^^ help: use the applicable keyword: `Self`
6
6
|
7
7
= note: `-D clippy::use-self` implied by `-D warnings`
8
8
9
9
error: unnecessary structure name repetition
10
- --> $DIR/use_self.rs:14:21
10
+ --> $DIR/use_self.rs:15:13
11
11
|
12
- LL | fn new() -> Foo {
13
- | ^^^ help: use the applicable keyword: `Self`
12
+ LL | Foo {}
13
+ | ^^^ help: use the applicable keyword: `Self`
14
14
15
15
error: unnecessary structure name repetition
16
16
--> $DIR/use_self.rs:17:22
17
17
|
18
18
LL | fn test() -> Foo {
19
19
| ^^^ help: use the applicable keyword: `Self`
20
20
21
+ error: unnecessary structure name repetition
22
+ --> $DIR/use_self.rs:19:13
23
+ |
24
+ LL | Foo::new()
25
+ | ^^^ help: use the applicable keyword: `Self`
26
+
27
+ error: unnecessary structure name repetition
28
+ --> $DIR/use_self.rs:25:25
29
+ |
30
+ LL | fn default() -> Foo {
31
+ | ^^^ help: use the applicable keyword: `Self`
32
+
33
+ error: unnecessary structure name repetition
34
+ --> $DIR/use_self.rs:27:13
35
+ |
36
+ LL | Foo::new()
37
+ | ^^^ help: use the applicable keyword: `Self`
38
+
21
39
error: unnecessary structure name repetition
22
40
--> $DIR/use_self.rs:96:24
23
41
|
24
42
LL | fn bad(foos: &[Foo]) -> impl Iterator<Item = &Foo> {
25
43
| ^^^ help: use the applicable keyword: `Self`
26
44
45
+ error: unnecessary structure name repetition
46
+ --> $DIR/use_self.rs:96:55
47
+ |
48
+ LL | fn bad(foos: &[Foo]) -> impl Iterator<Item = &Foo> {
49
+ | ^^^ help: use the applicable keyword: `Self`
50
+
27
51
error: unnecessary structure name repetition
28
52
--> $DIR/use_self.rs:111:13
29
53
|
30
54
LL | TS(0)
31
55
| ^^ help: use the applicable keyword: `Self`
32
56
33
57
error: unnecessary structure name repetition
34
- --> $DIR/use_self.rs:120:17
58
+ --> $DIR/use_self.rs:119:25
35
59
|
36
- LL | Foo {}
37
- | ^^^ help: use the applicable keyword: `Self`
60
+ LL | fn new() -> Foo {
61
+ | ^^^ help: use the applicable keyword: `Self`
38
62
...
39
63
LL | use_self_expand!(); // Should lint in local macros
40
64
| ------------------- in this macro invocation
41
65
|
42
66
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
43
67
44
68
error: unnecessary structure name repetition
45
- --> $DIR/use_self.rs:119:25
69
+ --> $DIR/use_self.rs:120:17
46
70
|
47
- LL | fn new() -> Foo {
48
- | ^^^ help: use the applicable keyword: `Self`
71
+ LL | Foo {}
72
+ | ^^^ help: use the applicable keyword: `Self`
49
73
...
50
74
LL | use_self_expand!(); // Should lint in local macros
51
75
| ------------------- in this macro invocation
52
76
|
53
77
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
54
78
55
- error: unnecessary structure name repetition
56
- --> $DIR/use_self.rs:144:21
57
- |
58
- LL | Bar { foo: Foo {} }
59
- | ^^^ help: use the applicable keyword: `Self`
60
-
61
79
error: unnecessary structure name repetition
62
80
--> $DIR/use_self.rs:143:29
63
81
|
64
82
LL | fn bar() -> Bar {
65
83
| ^^^ help: use the applicable keyword: `Self`
66
84
67
85
error: unnecessary structure name repetition
68
- --> $DIR/use_self.rs:156:13
86
+ --> $DIR/use_self.rs:144:21
69
87
|
70
- LL | Foo {}
71
- | ^^^ help: use the applicable keyword: `Self`
88
+ LL | Bar { foo: Foo {} }
89
+ | ^^^ help: use the applicable keyword: `Self`
72
90
73
91
error: unnecessary structure name repetition
74
92
--> $DIR/use_self.rs:155:21
75
93
|
76
94
LL | fn baz() -> Foo {
77
95
| ^^^ help: use the applicable keyword: `Self`
78
96
97
+ error: unnecessary structure name repetition
98
+ --> $DIR/use_self.rs:156:13
99
+ |
100
+ LL | Foo {}
101
+ | ^^^ help: use the applicable keyword: `Self`
102
+
79
103
error: unnecessary structure name repetition
80
104
--> $DIR/use_self.rs:173:21
81
105
|
@@ -94,30 +118,66 @@ error: unnecessary structure name repetition
94
118
LL | let _ = Enum::A;
95
119
| ^^^^ help: use the applicable keyword: `Self`
96
120
121
+ error: unnecessary structure name repetition
122
+ --> $DIR/use_self.rs:218:13
123
+ |
124
+ LL | nested::A::fun_1();
125
+ | ^^^^^^^^^ help: use the applicable keyword: `Self`
126
+
127
+ error: unnecessary structure name repetition
128
+ --> $DIR/use_self.rs:220:13
129
+ |
130
+ LL | nested::A::A;
131
+ | ^^^^^^^^^ help: use the applicable keyword: `Self`
132
+
97
133
error: unnecessary structure name repetition
98
134
--> $DIR/use_self.rs:222:13
99
135
|
100
136
LL | nested::A {};
101
137
| ^^^^^^^^^ help: use the applicable keyword: `Self`
102
138
139
+ error: unnecessary structure name repetition
140
+ --> $DIR/use_self.rs:242:13
141
+ |
142
+ LL | TestStruct::from_something()
143
+ | ^^^^^^^^^^ help: use the applicable keyword: `Self`
144
+
145
+ error: unnecessary structure name repetition
146
+ --> $DIR/use_self.rs:257:25
147
+ |
148
+ LL | async fn g() -> S {
149
+ | ^ help: use the applicable keyword: `Self`
150
+
103
151
error: unnecessary structure name repetition
104
152
--> $DIR/use_self.rs:258:13
105
153
|
106
154
LL | S {}
107
155
| ^ help: use the applicable keyword: `Self`
108
156
109
157
error: unnecessary structure name repetition
110
- --> $DIR/use_self.rs:287:13
158
+ --> $DIR/use_self.rs:263:16
111
159
|
112
- LL | Foo { value }
113
- | ^^^ help: use the applicable keyword: `Self`
160
+ LL | &p[S::A..S::B]
161
+ | ^ help: use the applicable keyword: `Self`
162
+
163
+ error: unnecessary structure name repetition
164
+ --> $DIR/use_self.rs:263:22
165
+ |
166
+ LL | &p[S::A..S::B]
167
+ | ^ help: use the applicable keyword: `Self`
114
168
115
169
error: unnecessary structure name repetition
116
170
--> $DIR/use_self.rs:286:29
117
171
|
118
172
LL | fn foo(value: T) -> Foo<T> {
119
173
| ^^^^^^ help: use the applicable keyword: `Self`
120
174
175
+ error: unnecessary structure name repetition
176
+ --> $DIR/use_self.rs:287:13
177
+ |
178
+ LL | Foo { value }
179
+ | ^^^ help: use the applicable keyword: `Self`
180
+
121
181
error: unnecessary structure name repetition
122
182
--> $DIR/use_self.rs:324:21
123
183
|
@@ -130,5 +190,11 @@ error: unnecessary structure name repetition
130
190
LL | type To = T::To;
131
191
| ^^^^^ help: use the applicable keyword: `Self`
132
192
133
- error: aborting due to 20 previous errors
193
+ error: unnecessary structure name repetition
194
+ --> $DIR/use_self.rs:464:13
195
+ |
196
+ LL | A::new::<submod::B>(submod::B {})
197
+ | ^ help: use the applicable keyword: `Self`
198
+
199
+ error: aborting due to 31 previous errors
134
200
0 commit comments