Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`#[forbid(unused_qualifications)]` is incompatible with all builtin derives #71898
Comments
|
Ah, the deprecation lint has this check: rust/src/librustc_middle/middle/stability.rs Lines 220 to 222 in 2454a68 |
|
@rustbot claim |
|
If my understanding is correct, rust/src/librustc_middle/lint.rs Line 224 in 2454a68 My original approach to this issue was to avoid adding the rust/src/librustc_resolve/late.rs Line 1844 in 2454a68 in_derive_expansion check makes a difference in the suggestion displayed(I did verify that the lint is captured in the lint_buffer in the case the unnecessary qualification is in an external crate, just not displayed).
Any thoughts on this approach, and suggestions on how I can go about testing this change? |


All built-in custom derives put
#[allow(unused_qualifications)]on the generated impl, but theforbidlevel can not be overridden by that.Custom derives are not able to trigger the
deprecatedlint, despite not attaching#[allow(deprecated)], so maybe the same mechanism should be used forunused_qualifications?This issue has been assigned to @samrat via this comment.