-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotate dead code lint with notes about ignored derived impls #92783
Conversation
Yes, this is more or less what I had in mind! The wording might be tuned very slightly. Right now it seems to say things like
It might be slightly more informative to say something to the effect of:
My suggestion feels like it might be too verbose, but my thought is to make it clear "yes, we know you have a derived impl of Bar, but we have good reasons not to count that when we're figuring out what's dead." Some wordsmithing help would be good here. I bet some small change will make it much more obvious to the reader. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice! I'm wondering if we can improve the output by citing the debug impl itself, perhaps with a message like
= note: this Debug impl exists, but Debug impls are intentionally ignored by the dead code analysis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks nice :)
@bors r+ |
📌 Commit 8b459dd has been approved by |
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#88642 (Formally implement let chains) - rust-lang#89621 (doc: guarantee call order for sort_by_cached_key) - rust-lang#91278 (Use iterator instead of recursion in `codegen_place`) - rust-lang#92124 (Little improves in CString `new` when creating from slice) - rust-lang#92783 (Annotate dead code lint with notes about ignored derived impls) - rust-lang#92797 (Remove horizontal lines at top of page) - rust-lang#92920 (Move expr- and item-related pretty printing functions to modules) - rust-lang#93041 (Remove some unused ordering derivations based on `DefId`) - rust-lang#93051 (Add Option::is_some_with and Result::is_{ok,err}_with) - rust-lang#93062 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Hooray! |
Fixes #92726. CC @pmetzger, is this what you had in mind?
r? @nikomatsakis