Skip to content

Commit dc882a8

Browse files
committed
Allow wrong_self_convention in use_self test for trait def
1 parent 9323873 commit dc882a8

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

tests/ui/use_self.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ mod lifetimes {
7171

7272
mod issue2894 {
7373
trait IntoBytes {
74+
#![allow(clippy::clippy::wrong_self_convention)]
7475
fn into_bytes(&self) -> Vec<u8>;
7576
}
7677

tests/ui/use_self.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ mod lifetimes {
7171

7272
mod issue2894 {
7373
trait IntoBytes {
74+
#![allow(clippy::clippy::wrong_self_convention)]
7475
fn into_bytes(&self) -> Vec<u8>;
7576
}
7677

tests/ui/use_self.stderr

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ LL | Foo::new()
3737
| ^^^ help: use the applicable keyword: `Self`
3838

3939
error: unnecessary structure name repetition
40-
--> $DIR/use_self.rs:89:56
40+
--> $DIR/use_self.rs:90:56
4141
|
4242
LL | fn bad(foos: &[Self]) -> impl Iterator<Item = &Foo> {
4343
| ^^^ help: use the applicable keyword: `Self`
4444

4545
error: unnecessary structure name repetition
46-
--> $DIR/use_self.rs:104:13
46+
--> $DIR/use_self.rs:105:13
4747
|
4848
LL | TS(0)
4949
| ^^ help: use the applicable keyword: `Self`
5050

5151
error: unnecessary structure name repetition
52-
--> $DIR/use_self.rs:112:25
52+
--> $DIR/use_self.rs:113:25
5353
|
5454
LL | fn new() -> Foo {
5555
| ^^^ help: use the applicable keyword: `Self`
@@ -60,7 +60,7 @@ LL | use_self_expand!(); // Should lint in local macros
6060
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
6161

6262
error: unnecessary structure name repetition
63-
--> $DIR/use_self.rs:113:17
63+
--> $DIR/use_self.rs:114:17
6464
|
6565
LL | Foo {}
6666
| ^^^ help: use the applicable keyword: `Self`
@@ -71,91 +71,91 @@ LL | use_self_expand!(); // Should lint in local macros
7171
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
7272

7373
error: unnecessary structure name repetition
74-
--> $DIR/use_self.rs:148:21
74+
--> $DIR/use_self.rs:149:21
7575
|
7676
LL | fn baz() -> Foo {
7777
| ^^^ help: use the applicable keyword: `Self`
7878

7979
error: unnecessary structure name repetition
80-
--> $DIR/use_self.rs:149:13
80+
--> $DIR/use_self.rs:150:13
8181
|
8282
LL | Foo {}
8383
| ^^^ help: use the applicable keyword: `Self`
8484

8585
error: unnecessary structure name repetition
86-
--> $DIR/use_self.rs:136:29
86+
--> $DIR/use_self.rs:137:29
8787
|
8888
LL | fn bar() -> Bar {
8989
| ^^^ help: use the applicable keyword: `Self`
9090

9191
error: unnecessary structure name repetition
92-
--> $DIR/use_self.rs:137:21
92+
--> $DIR/use_self.rs:138:21
9393
|
9494
LL | Bar { foo: Foo {} }
9595
| ^^^ help: use the applicable keyword: `Self`
9696

9797
error: unnecessary structure name repetition
98-
--> $DIR/use_self.rs:166:21
98+
--> $DIR/use_self.rs:167:21
9999
|
100100
LL | let _ = Enum::B(42);
101101
| ^^^^ help: use the applicable keyword: `Self`
102102

103103
error: unnecessary structure name repetition
104-
--> $DIR/use_self.rs:167:21
104+
--> $DIR/use_self.rs:168:21
105105
|
106106
LL | let _ = Enum::C { field: true };
107107
| ^^^^ help: use the applicable keyword: `Self`
108108

109109
error: unnecessary structure name repetition
110-
--> $DIR/use_self.rs:168:21
110+
--> $DIR/use_self.rs:169:21
111111
|
112112
LL | let _ = Enum::A;
113113
| ^^^^ help: use the applicable keyword: `Self`
114114

115115
error: unnecessary structure name repetition
116-
--> $DIR/use_self.rs:199:13
116+
--> $DIR/use_self.rs:200:13
117117
|
118118
LL | nested::A::fun_1();
119119
| ^^^^^^^^^ help: use the applicable keyword: `Self`
120120

121121
error: unnecessary structure name repetition
122-
--> $DIR/use_self.rs:200:13
122+
--> $DIR/use_self.rs:201:13
123123
|
124124
LL | nested::A::A;
125125
| ^^^^^^^^^ help: use the applicable keyword: `Self`
126126

127127
error: unnecessary structure name repetition
128-
--> $DIR/use_self.rs:202:13
128+
--> $DIR/use_self.rs:203:13
129129
|
130130
LL | nested::A {};
131131
| ^^^^^^^^^ help: use the applicable keyword: `Self`
132132

133133
error: unnecessary structure name repetition
134-
--> $DIR/use_self.rs:221:13
134+
--> $DIR/use_self.rs:222:13
135135
|
136136
LL | TestStruct::from_something()
137137
| ^^^^^^^^^^ help: use the applicable keyword: `Self`
138138

139139
error: unnecessary structure name repetition
140-
--> $DIR/use_self.rs:235:25
140+
--> $DIR/use_self.rs:236:25
141141
|
142142
LL | async fn g() -> S {
143143
| ^ help: use the applicable keyword: `Self`
144144

145145
error: unnecessary structure name repetition
146-
--> $DIR/use_self.rs:236:13
146+
--> $DIR/use_self.rs:237:13
147147
|
148148
LL | S {}
149149
| ^ help: use the applicable keyword: `Self`
150150

151151
error: unnecessary structure name repetition
152-
--> $DIR/use_self.rs:240:16
152+
--> $DIR/use_self.rs:241:16
153153
|
154154
LL | &p[S::A..S::B]
155155
| ^ help: use the applicable keyword: `Self`
156156

157157
error: unnecessary structure name repetition
158-
--> $DIR/use_self.rs:240:22
158+
--> $DIR/use_self.rs:241:22
159159
|
160160
LL | &p[S::A..S::B]
161161
| ^ help: use the applicable keyword: `Self`

0 commit comments

Comments
 (0)