Closed
Description
Given the following code:
#[derive(Debug)]
pub struct Whatever {
pub field0: (),
field1: (),
field2: (),
field3: (),
field4: (),
}
The current output is:
warning: field is never read: `field1`
--> src\cmake\preset.rs:23:3
|
23 | field1: (),
| ^^^^^^^^^^
|
note: `Whatever` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
--> src\cmake\preset.rs:20:10
|
20 | #[derive(Debug)]
| ^^^^^
= note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: field is never read: `field2`
--> src\cmake\preset.rs:24:3
|
24 | field2: (),
| ^^^^^^^^^^
|
note: `Whatever` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
--> src\cmake\preset.rs:20:10
|
20 | #[derive(Debug)]
| ^^^^^
= note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: field is never read: `field3`
--> src\cmake\preset.rs:25:3
|
25 | field3: (),
| ^^^^^^^^^^
|
note: `Whatever` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
--> src\cmake\preset.rs:20:10
|
20 | #[derive(Debug)]
| ^^^^^
= note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: field is never read: `field4`
--> src\cmake\preset.rs:26:3
|
26 | field4: (),
| ^^^^^^^^^^
|
note: `Whatever` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
--> src\cmake\preset.rs:20:10
|
20 | #[derive(Debug)]
| ^^^^^
= note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
Ideally the output should look like:
warning: field is never read: `field1`
--> src\cmake\preset.rs:23:3
|
23 | field1: (),
| ^^^^^^^^^^
|
warning: field is never read: `field2`
--> src\cmake\preset.rs:24:3
|
24 | field2: (),
| ^^^^^^^^^^
|
warning: field is never read: `field3`
--> src\cmake\preset.rs:25:3
|
25 | field3: (),
| ^^^^^^^^^^
|
warning: field is never read: `field4`
--> src\cmake\preset.rs:26:3
|
26 | field4: (),
| ^^^^^^^^^^
|
note: `Whatever` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
--> src\cmake\preset.rs:20:10
|
20 | #[derive(Debug)]
| ^^^^^
= note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
Or something even more compact if possible. Without this, compiler output is almost double, and mostly unnecessary.