about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src/errors.rs
AgeCommit message (Collapse)AuthorLines
2025-04-17Replace infallible `name_or_empty` methods with fallible `name` methods.Nicholas Nethercote-3/+2
I'm removing empty identifiers everywhere, because in practice they always mean "no identifier" rather than "empty identifier". (An empty identifier is impossible.) It's better to use `Option` to mean "no identifier" because you then can't forget about the "no identifier" possibility. Some specifics: - When testing an attribute for a single name, the commit uses the `has_name` method. - When testing an attribute for multiple names, the commit uses the new `has_any_name` method. - When using `match` on an attribute, the match arms now have `Some` on them. In the tests, we now avoid printing empty identifiers by not printing the identifier in the `error:` line at all, instead letting the carets point out the problem.
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-08-27Add `warn(unreachable_pub)` to `rustc_incremental`.Nicholas Nethercote-41/+41
2024-08-25Removes dead code from the compilermu001999-7/+0
2024-08-21Use bool in favor of Option<()> for diagnosticsMichael Goulet-2/+2
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-21Add a footer in FileEncoder and check for it in MemDecoderBen Kimock-0/+6
2023-11-04Remove unused LoadResult::DecodeIncrCache variantbjorn3-6/+0
2023-10-09Remove cgu_reuse_tracker from Sessionbjorn3-50/+0
This removes a bit of global mutable state
2023-01-30incremental: migrate diagnosticsDavid Wood-0/+364
Migrate the `rustc_incremental` crate's diagnostics to translatable diagnostic structs. Signed-off-by: David Wood <david.wood@huawei.com>