about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/early/diagnostics
AgeCommit message (Collapse)AuthorLines
2025-05-23Suggest correct `version("..")` predicate syntax in check-cfgUrgau-0/+8
2025-02-02Convert two `rustc_middle::lint` functions to `Span` methods.Nicholas Nethercote-2/+2
`rustc_middle` is a huge crate and it's always good to move stuff out of it. There are lots of similar methods already on `Span`, so these two functions, `in_external_macro` and `is_from_async_await`, fit right in. The diff is big because `in_external_macro` is used a lot by clippy lints.
2025-01-25Filter well known names from check-cfg diagnosticsUrgau-4/+25
2024-12-18Re-export more `rustc_span::symbol` things from `rustc_span`.Nicholas Nethercote-2/+1
`rustc_span::symbol` defines some things that are re-exported from `rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some closely related things such as `Ident` and `kw`. So you can do `use rustc_span::{Symbol, sym}` but you have to do `use rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good reason. This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`, and changes many `rustc_span::symbol::` qualifiers in `compiler/` to `rustc_span::`. This is a 200+ net line of code reduction, mostly because many files with two `use rustc_span` items can be reduced to one.
2024-12-15Improve check-cfg Cargo macro diagnostic with crate nameUrgau-5/+11
2024-12-15Access `TyCtxt` from early diagnostic decorationUrgau-0/+362