This repository was archived by the owner on Mar 25, 2024. It is now read-only.
Commit 77236b0
committed
Ignore dead code lint in tests
New in nightly-2024-03-24 from rust-lang/rust#119552.
warning: field `b` is never read
--> tests/test_error.rs:53:13
|
52 | pub struct A {
| - field in this struct
53 | pub b: Vec<B>,
| ^
|
= note: `A` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
warning: field `0` is never read
--> tests/test_error.rs:57:11
|
57 | C(C),
| - ^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
57 | C(()),
| ~~
warning: field `d` is never read
--> tests/test_error.rs:61:13
|
60 | pub struct C {
| - field in this struct
61 | pub d: bool,
| ^
|
= note: `C` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: fields `v` and `w` are never read
--> tests/test_error.rs:82:13
|
81 | pub struct Basic {
| ----- fields in this struct
82 | pub v: bool,
| ^
83 | pub w: bool,
| ^
|
= note: `Basic` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: field `c` is never read
--> tests/test_error.rs:107:13
|
106 | pub struct Wrapper {
| ------- field in this struct
107 | pub c: (),
| ^
|
= note: `Wrapper` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: field `0` is never read
--> tests/test_error.rs:160:11
|
160 | V(usize),
| - ^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
160 | V(()),
| ~~
warning: field `0` is never read
--> tests/test_error.rs:212:15
|
212 | Inner(Inner),
| ----- ^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
212 | Inner(()),
| ~~
warning: field `0` is never read
--> tests/test_error.rs:216:17
|
216 | Variant(Vec<usize>),
| ------- ^^^^^^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
216 | Variant(()),
| ~~
warning: field `0` is never read
--> tests/test_error.rs:245:11
|
245 | V(usize),
| - ^^^^^
| |
| field in this variant
|
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
245 | V(()),
| ~~
warning: fields `x` and `y` are never read
--> tests/test_error.rs:260:13
|
259 | pub struct Struct {
| ------ fields in this struct
260 | pub x: usize,
| ^
261 | pub y: usize,
| ^
|
= note: `Struct` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: field `x` is never read
--> tests/test_error.rs:334:13
|
333 | pub struct S {
| - field in this struct
334 | pub x: [i32; 1],
| ^
|
= note: `S` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: field `x` is never read
--> tests/test_error.rs:347:13
|
346 | pub struct S {
| - field in this struct
347 | pub x: Option<Box<S>>,
| ^
|
= note: `S` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: fields `0` and `1` are never read
--> tests/test_error.rs:359:18
|
359 | pub struct S(pub usize, pub Option<Box<S>>);
| - ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
| |
| fields in this struct
|
= note: `S` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields
|
359 | pub struct S((), ());
| ~~ ~~
warning: field `0` is never read
--> tests/test_error.rs:370:18
|
370 | pub struct S(pub Option<Box<S>>);
| - ^^^^^^^^^^^^^^^^^^
| |
| field in this struct
|
= note: `S` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
370 | pub struct S(());
| ~~
warning: field `x` is never read
--> tests/test_error.rs:382:13
|
381 | pub struct S {
| - field in this struct
382 | pub x: Option<Box<S>>,
| ^
|
= note: `S` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
warning: fields `0` and `1` are never read
--> tests/test_error.rs:394:18
|
394 | pub struct S(pub usize, pub Option<Box<S>>);
| - ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
| |
| fields in this struct
|
= note: `S` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields
|
394 | pub struct S((), ());
| ~~ ~~1 parent f4c9ed9 commit 77236b0
1 file changed
+24
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| 84 | + | |
82 | 85 | | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
| 111 | + | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
| |||
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
160 | | - | |
| 165 | + | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| |||
209 | 214 | | |
210 | 215 | | |
211 | 216 | | |
212 | | - | |
| 217 | + | |
213 | 218 | | |
214 | 219 | | |
215 | 220 | | |
216 | | - | |
| 221 | + | |
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
| |||
242 | 247 | | |
243 | 248 | | |
244 | 249 | | |
245 | | - | |
| 250 | + | |
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
| |||
257 | 262 | | |
258 | 263 | | |
259 | 264 | | |
| 265 | + | |
260 | 266 | | |
| 267 | + | |
261 | 268 | | |
262 | 269 | | |
263 | 270 | | |
| |||
331 | 338 | | |
332 | 339 | | |
333 | 340 | | |
| 341 | + | |
334 | 342 | | |
335 | 343 | | |
336 | 344 | | |
| |||
344 | 352 | | |
345 | 353 | | |
346 | 354 | | |
| 355 | + | |
347 | 356 | | |
348 | 357 | | |
349 | 358 | | |
| |||
356 | 365 | | |
357 | 366 | | |
358 | 367 | | |
359 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
360 | 372 | | |
361 | 373 | | |
362 | 374 | | |
| |||
367 | 379 | | |
368 | 380 | | |
369 | 381 | | |
370 | | - | |
| 382 | + | |
371 | 383 | | |
372 | 384 | | |
373 | 385 | | |
| |||
379 | 391 | | |
380 | 392 | | |
381 | 393 | | |
| 394 | + | |
382 | 395 | | |
383 | 396 | | |
384 | 397 | | |
| |||
391 | 404 | | |
392 | 405 | | |
393 | 406 | | |
394 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
395 | 411 | | |
396 | 412 | | |
397 | 413 | | |
| |||
0 commit comments