You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lints behave a little strange with macros, particularly from external crates. This should probably be captured somewhere, probably the diagnostics page for allow/warn/deny/forbid.
For example, lints generated on items created by an extern macro do not fire. Calling the following will not trigger a (deny by default) lint:
See also rust-lang/rust#58502 where the ident comes from the local crate, but does not pick up the global lint level of the extern crate.
So I imagine there are a variety of things to consider (the location of a span, the lint level of the local and extern crates, etc.). I don't know where to begin distilling how things work. Perhaps it is not as complex as it appears. I also get the impression that it depends on exactly which lint it is, since some are done at different phases.
The text was updated successfully, but these errors were encountered:
The intent is to report a lint if it can be addressed by the person encountering it, and not report it if the code comes from third party and cannot be fixed.
So, the characteristic span needs to be chosen accordingly (cc rust-lang/rust#50122 which is a related issue).
but does not pick up the global lint level of the extern crate.
Lint level of the external crate is never picked, we don't have this kind of hygiene.
allow/warn/deny/forbid attributes only work as a tree applied to expanded local crate.
Lints behave a little strange with macros, particularly from external crates. This should probably be captured somewhere, probably the diagnostics page for allow/warn/deny/forbid.
For example, lints generated on items created by an extern macro do not fire. Calling the following will not trigger a (deny by default) lint:
See also rust-lang/rust#58502 where the ident comes from the local crate, but does not pick up the global lint level of the extern crate.
So I imagine there are a variety of things to consider (the location of a span, the lint level of the local and extern crates, etc.). I don't know where to begin distilling how things work. Perhaps it is not as complex as it appears. I also get the impression that it depends on exactly which lint it is, since some are done at different phases.
The text was updated successfully, but these errors were encountered: