Reading issue
rust-lang / rust · Issue No. 160621
See https://github.com/tokio-rs/tracing/issues/2209 for a concrete bug this would fix.
This is related to Debug and Clone impls where we already have such a special case. I would like to generalize this to a #[diagnostics::] attribute usable on stable.
#[derive(Debug)]
pub struct Foo {
field: u32,
}
pub fn bar(x: Foo) {
println!("{x:?}");
}
warning: field `field` is never read
--> src/lib.rs:3:5
|
2 | pub struct Foo {
| --- field in this struct
3 | field: u32,
| ^^^^^
|
= note: `Foo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.