unused_qualifications
shouldn't trigger on expanded code
#96698
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code:
Where
my_enum_macro
, among other things, uses the path provided for the variant to qualify a type based on the key. It so happens that for the first variant here, the type in the expanded code resolves tosuper::a::AType
.The current output is:
Since the type is already imported at the top, the qualification is indeed unnecessary. But I would also expect to have the same behavior with my macro what other imports there are above.
That's why I believe that this warning shouldn't trigger on expanded code, or at least between regular and expanded code.
The text was updated successfully, but these errors were encountered: