Skip to content

Commit 94495fc

Browse files
surpress in other tests
1 parent f75282e commit 94495fc

7 files changed

+39
-60
lines changed

tests/ui/module_name_repetitions.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#![warn(clippy::module_name_repetitions)]
44
#![allow(dead_code)]
5+
#![allow(clippy::missing_error_implementations)]
56

67
pub mod foo {
78
pub fn foo() {}

tests/ui/module_name_repetitions.stderr

+1-26
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
error: lint name `missing_error_implementations` is deprecated and may not have an effect in the future
2-
--> tests/ui/module_name_repetitions.rs:5:10
3-
|
4-
LL | #![allow(missing_error_implementations)]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `clippy::missing_error_implementations`
6-
|
7-
= note: `-D renamed-and-removed-lints` implied by `-D warnings`
8-
= help: to override `-D warnings` add `#[allow(renamed_and_removed_lints)]`
9-
10-
error: lint name `missing_error_implementations` is deprecated and may not have an effect in the future
11-
--> tests/ui/module_name_repetitions.rs:5:10
12-
|
13-
LL | #![allow(missing_error_implementations)]
14-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `clippy::missing_error_implementations`
15-
|
16-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
17-
18-
error: lint name `missing_error_implementations` is deprecated and may not have an effect in the future
19-
--> tests/ui/module_name_repetitions.rs:5:10
20-
|
21-
LL | #![allow(missing_error_implementations)]
22-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change it to: `clippy::missing_error_implementations`
23-
|
24-
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
25-
261
error: item name starts with its containing module's name
272
--> tests/ui/module_name_repetitions.rs:9:12
283
|
@@ -62,5 +37,5 @@ error: item name starts with its containing module's name
6237
LL | pub use error::FooError;
6338
| ^^^^^^^^
6439

65-
error: aborting due to 9 previous errors
40+
error: aborting due to 6 previous errors
6641

tests/ui/question_mark.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![allow(unreachable_code)]
33
#![allow(dead_code)]
44
#![allow(clippy::unnecessary_wraps)]
5+
#![allow(clippy::missing_error_implementations)]
56

67
fn some_func(a: Option<u32>) -> Option<u32> {
78
a?;

tests/ui/question_mark.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![allow(unreachable_code)]
33
#![allow(dead_code)]
44
#![allow(clippy::unnecessary_wraps)]
5+
#![allow(clippy::missing_error_implementations)]
56

67
fn some_func(a: Option<u32>) -> Option<u32> {
78
if a.is_none() {

tests/ui/question_mark.stderr

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: this block may be rewritten with the `?` operator
2-
--> tests/ui/question_mark.rs:7:5
2+
--> tests/ui/question_mark.rs:8:5
33
|
44
LL | / if a.is_none() {
55
LL | |
@@ -11,7 +11,7 @@ LL | | }
1111
= help: to override `-D warnings` add `#[allow(clippy::question_mark)]`
1212

1313
error: this block may be rewritten with the `?` operator
14-
--> tests/ui/question_mark.rs:53:9
14+
--> tests/ui/question_mark.rs:54:9
1515
|
1616
LL | / if (self.opt).is_none() {
1717
LL | |
@@ -20,7 +20,7 @@ LL | | }
2020
| |_________^ help: replace it with: `(self.opt)?;`
2121

2222
error: this block may be rewritten with the `?` operator
23-
--> tests/ui/question_mark.rs:58:9
23+
--> tests/ui/question_mark.rs:59:9
2424
|
2525
LL | / if self.opt.is_none() {
2626
LL | |
@@ -29,7 +29,7 @@ LL | | }
2929
| |_________^ help: replace it with: `self.opt?;`
3030

3131
error: this block may be rewritten with the `?` operator
32-
--> tests/ui/question_mark.rs:63:17
32+
--> tests/ui/question_mark.rs:64:17
3333
|
3434
LL | let _ = if self.opt.is_none() {
3535
| _________________^
@@ -41,7 +41,7 @@ LL | | };
4141
| |_________^ help: replace it with: `Some(self.opt?)`
4242

4343
error: this block may be rewritten with the `?` operator
44-
--> tests/ui/question_mark.rs:70:17
44+
--> tests/ui/question_mark.rs:71:17
4545
|
4646
LL | let _ = if let Some(x) = self.opt {
4747
| _________________^
@@ -53,7 +53,7 @@ LL | | };
5353
| |_________^ help: replace it with: `self.opt?`
5454

5555
error: this block may be rewritten with the `?` operator
56-
--> tests/ui/question_mark.rs:88:9
56+
--> tests/ui/question_mark.rs:89:9
5757
|
5858
LL | / if self.opt.is_none() {
5959
LL | |
@@ -62,7 +62,7 @@ LL | | }
6262
| |_________^ help: replace it with: `self.opt.as_ref()?;`
6363

6464
error: this block may be rewritten with the `?` operator
65-
--> tests/ui/question_mark.rs:97:9
65+
--> tests/ui/question_mark.rs:98:9
6666
|
6767
LL | / if self.opt.is_none() {
6868
LL | |
@@ -71,7 +71,7 @@ LL | | }
7171
| |_________^ help: replace it with: `self.opt.as_ref()?;`
7272

7373
error: this block may be rewritten with the `?` operator
74-
--> tests/ui/question_mark.rs:106:9
74+
--> tests/ui/question_mark.rs:107:9
7575
|
7676
LL | / if self.opt.is_none() {
7777
LL | |
@@ -80,7 +80,7 @@ LL | | }
8080
| |_________^ help: replace it with: `self.opt.as_ref()?;`
8181

8282
error: this block may be rewritten with the `?` operator
83-
--> tests/ui/question_mark.rs:114:26
83+
--> tests/ui/question_mark.rs:115:26
8484
|
8585
LL | let v: &Vec<_> = if let Some(ref v) = self.opt {
8686
| __________________________^
@@ -92,7 +92,7 @@ LL | | };
9292
| |_________^ help: replace it with: `self.opt.as_ref()?`
9393

9494
error: this block may be rewritten with the `?` operator
95-
--> tests/ui/question_mark.rs:125:17
95+
--> tests/ui/question_mark.rs:126:17
9696
|
9797
LL | let v = if let Some(v) = self.opt {
9898
| _________________^
@@ -104,7 +104,7 @@ LL | | };
104104
| |_________^ help: replace it with: `self.opt?`
105105

106106
error: this block may be rewritten with the `?` operator
107-
--> tests/ui/question_mark.rs:147:5
107+
--> tests/ui/question_mark.rs:148:5
108108
|
109109
LL | / if f().is_none() {
110110
LL | |
@@ -113,7 +113,7 @@ LL | | }
113113
| |_____^ help: replace it with: `f()?;`
114114

115115
error: this `match` expression can be replaced with `?`
116-
--> tests/ui/question_mark.rs:152:16
116+
--> tests/ui/question_mark.rs:153:16
117117
|
118118
LL | let _val = match f() {
119119
| ________________^
@@ -124,7 +124,7 @@ LL | | };
124124
| |_____^ help: try instead: `f()?`
125125

126126
error: this `match` expression can be replaced with `?`
127-
--> tests/ui/question_mark.rs:163:5
127+
--> tests/ui/question_mark.rs:164:5
128128
|
129129
LL | / match f() {
130130
LL | |
@@ -134,7 +134,7 @@ LL | | };
134134
| |_____^ help: try instead: `f()?`
135135

136136
error: this `match` expression can be replaced with `?`
137-
--> tests/ui/question_mark.rs:169:5
137+
--> tests/ui/question_mark.rs:170:5
138138
|
139139
LL | / match opt_none!() {
140140
LL | |
@@ -144,13 +144,13 @@ LL | | };
144144
| |_____^ help: try instead: `opt_none!()?`
145145

146146
error: this block may be rewritten with the `?` operator
147-
--> tests/ui/question_mark.rs:196:13
147+
--> tests/ui/question_mark.rs:197:13
148148
|
149149
LL | let _ = if let Ok(x) = x { x } else { return x };
150150
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `x?`
151151

152152
error: this block may be rewritten with the `?` operator
153-
--> tests/ui/question_mark.rs:199:5
153+
--> tests/ui/question_mark.rs:200:5
154154
|
155155
LL | / if x.is_err() {
156156
LL | |
@@ -159,7 +159,7 @@ LL | | }
159159
| |_____^ help: replace it with: `x?;`
160160

161161
error: this `match` expression can be replaced with `?`
162-
--> tests/ui/question_mark.rs:204:16
162+
--> tests/ui/question_mark.rs:205:16
163163
|
164164
LL | let _val = match func_returning_result() {
165165
| ________________^
@@ -170,7 +170,7 @@ LL | | };
170170
| |_____^ help: try instead: `func_returning_result()?`
171171

172172
error: this `match` expression can be replaced with `?`
173-
--> tests/ui/question_mark.rs:210:5
173+
--> tests/ui/question_mark.rs:211:5
174174
|
175175
LL | / match func_returning_result() {
176176
LL | |
@@ -180,7 +180,7 @@ LL | | };
180180
| |_____^ help: try instead: `func_returning_result()?`
181181

182182
error: this block may be rewritten with the `?` operator
183-
--> tests/ui/question_mark.rs:302:5
183+
--> tests/ui/question_mark.rs:303:5
184184
|
185185
LL | / if let Err(err) = func_returning_result() {
186186
LL | |
@@ -189,7 +189,7 @@ LL | | }
189189
| |_____^ help: replace it with: `func_returning_result()?;`
190190

191191
error: this block may be rewritten with the `?` operator
192-
--> tests/ui/question_mark.rs:310:5
192+
--> tests/ui/question_mark.rs:311:5
193193
|
194194
LL | / if let Err(err) = func_returning_result() {
195195
LL | |
@@ -198,7 +198,7 @@ LL | | }
198198
| |_____^ help: replace it with: `func_returning_result()?;`
199199

200200
error: this block may be rewritten with the `?` operator
201-
--> tests/ui/question_mark.rs:388:13
201+
--> tests/ui/question_mark.rs:389:13
202202
|
203203
LL | / if a.is_none() {
204204
LL | |
@@ -208,7 +208,7 @@ LL | | }
208208
| |_____________^ help: replace it with: `a?;`
209209

210210
error: this `let...else` may be rewritten with the `?` operator
211-
--> tests/ui/question_mark.rs:449:5
211+
--> tests/ui/question_mark.rs:450:5
212212
|
213213
LL | / let Some(v) = bar.foo.owned.clone() else {
214214
LL | | return None;

tests/ui/result_large_err.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#![warn(clippy::result_large_err)]
44
#![allow(clippy::large_enum_variant)]
5+
#![allow(clippy::missing_error_implementations)]
56

67
pub fn small_err() -> Result<(), u128> {
78
Ok(())

tests/ui/result_large_err.stderr

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: the `Err`-variant returned from this function is very large
2-
--> tests/ui/result_large_err.rs:10:23
2+
--> tests/ui/result_large_err.rs:11:23
33
|
44
LL | pub fn large_err() -> Result<(), [u8; 512]> {
55
| ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 512 bytes
@@ -9,39 +9,39 @@ LL | pub fn large_err() -> Result<(), [u8; 512]> {
99
= help: to override `-D warnings` add `#[allow(clippy::result_large_err)]`
1010

1111
error: the `Err`-variant returned from this function is very large
12-
--> tests/ui/result_large_err.rs:23:21
12+
--> tests/ui/result_large_err.rs:24:21
1313
|
1414
LL | pub fn ret() -> Result<(), Self> {
1515
| ^^^^^^^^^^^^^^^^ the `Err`-variant is at least 240 bytes
1616
|
1717
= help: try reducing the size of `FullyDefinedLargeError`, for example by boxing large elements or replacing it with `Box<FullyDefinedLargeError>`
1818

1919
error: the `Err`-variant returned from this function is very large
20-
--> tests/ui/result_large_err.rs:30:26
20+
--> tests/ui/result_large_err.rs:31:26
2121
|
2222
LL | pub fn struct_error() -> Result<(), FullyDefinedLargeError> {
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 240 bytes
2424
|
2525
= help: try reducing the size of `FullyDefinedLargeError`, for example by boxing large elements or replacing it with `Box<FullyDefinedLargeError>`
2626

2727
error: the `Err`-variant returned from this function is very large
28-
--> tests/ui/result_large_err.rs:37:45
28+
--> tests/ui/result_large_err.rs:38:45
2929
|
3030
LL | pub fn large_err_via_type_alias<T>(x: T) -> Fdlr<T> {
3131
| ^^^^^^^ the `Err`-variant is at least 240 bytes
3232
|
3333
= help: try reducing the size of `FullyDefinedLargeError`, for example by boxing large elements or replacing it with `Box<FullyDefinedLargeError>`
3434

3535
error: the `Err`-variant returned from this function is very large
36-
--> tests/ui/result_large_err.rs:47:34
36+
--> tests/ui/result_large_err.rs:48:34
3737
|
3838
LL | pub fn param_large_error<R>() -> Result<(), (u128, R, FullyDefinedLargeError)> {
3939
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 256 bytes
4040
|
4141
= help: try reducing the size of `(u128, R, FullyDefinedLargeError)`, for example by boxing large elements or replacing it with `Box<(u128, R, FullyDefinedLargeError)>`
4242

4343
error: the `Err`-variant returned from this function is very large
44-
--> tests/ui/result_large_err.rs:60:34
44+
--> tests/ui/result_large_err.rs:61:34
4545
|
4646
LL | _Omg([u8; 512]),
4747
| --------------- the largest variant contains at least 512 bytes
@@ -52,7 +52,7 @@ LL | pub fn large_enum_error() -> Result<(), Self> {
5252
= help: try reducing the size of `LargeErrorVariants<()>`, for example by boxing large elements or replacing it with `Box<LargeErrorVariants<()>>`
5353

5454
error: the `Err`-variant returned from this function is very large
55-
--> tests/ui/result_large_err.rs:74:30
55+
--> tests/ui/result_large_err.rs:75:30
5656
|
5757
LL | _Biggest([u8; 1024]),
5858
| -------------------- the largest variant contains at least 1024 bytes
@@ -65,39 +65,39 @@ LL | fn large_enum_error() -> Result<(), Self> {
6565
= help: try reducing the size of `MultipleLargeVariants`, for example by boxing large elements or replacing it with `Box<MultipleLargeVariants>`
6666

6767
error: the `Err`-variant returned from this function is very large
68-
--> tests/ui/result_large_err.rs:82:25
68+
--> tests/ui/result_large_err.rs:83:25
6969
|
7070
LL | fn large_error() -> Result<(), [u8; 512]> {
7171
| ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 512 bytes
7272
|
7373
= help: try reducing the size of `[u8; 512]`, for example by boxing large elements or replacing it with `Box<[u8; 512]>`
7474

7575
error: the `Err`-variant returned from this function is very large
76-
--> tests/ui/result_large_err.rs:103:29
76+
--> tests/ui/result_large_err.rs:104:29
7777
|
7878
LL | pub fn large_union_err() -> Result<(), FullyDefinedUnionError> {
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 512 bytes
8080
|
8181
= help: try reducing the size of `FullyDefinedUnionError`, for example by boxing large elements or replacing it with `Box<FullyDefinedUnionError>`
8282

8383
error: the `Err`-variant returned from this function is very large
84-
--> tests/ui/result_large_err.rs:114:40
84+
--> tests/ui/result_large_err.rs:115:40
8585
|
8686
LL | pub fn param_large_union<T: Copy>() -> Result<(), UnionError<T>> {
8787
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 512 bytes
8888
|
8989
= help: try reducing the size of `UnionError<T>`, for example by boxing large elements or replacing it with `Box<UnionError<T>>`
9090

9191
error: the `Err`-variant returned from this function is very large
92-
--> tests/ui/result_large_err.rs:125:34
92+
--> tests/ui/result_large_err.rs:126:34
9393
|
9494
LL | pub fn array_error_subst<U>() -> Result<(), ArrayError<i32, U>> {
9595
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 128 bytes
9696
|
9797
= help: try reducing the size of `ArrayError<i32, U>`, for example by boxing large elements or replacing it with `Box<ArrayError<i32, U>>`
9898

9999
error: the `Err`-variant returned from this function is very large
100-
--> tests/ui/result_large_err.rs:131:31
100+
--> tests/ui/result_large_err.rs:132:31
101101
|
102102
LL | pub fn array_error<T, U>() -> Result<(), ArrayError<(i32, T), U>> {
103103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 128 bytes

0 commit comments

Comments
 (0)