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
Rollup merge of #149662 - JonathanBrouwer:lint-rework, r=jdonszelmann
Move attribute lints to `rustc_lint`
This PR changes two things:
- This decouples the `AttributeLintKind` from the `Lint` it is emitted in. `cx.emit_lint` now takes both as an argument, rather than inferring the `Lint` from the `AttributeLintKind`. This is nice because:
- It allows us to remove `AttributeLintKind::InvalidMacroExportArguments`
- It allows us to move the choice between `USELESS_DEPRECATED` and `UNUSED_ATTRIBUTES` out of the lint emitting code
- It allows the next change:
- This moves `AttributeLintKind` to `rustc_lint_defs`, and the decorating code to `rustc_lint`. This is nice because:
- It allows attribute lint decorating code to access the TypeCtxt, which unblocks #149215
- It might allow most early buffered attribute lints to become dyn lint diagnostics in the future, as in #147634
- It deduplicates `IllFormedAttributeInput`
This PR does not change observable output of the compiler, as can be seen by no uitests being affected.
r? `@jdonszelmann`
0 commit comments