rust/compiler/rustc_parse/src/lexer
Nicholas Nethercote b18f3e11fa Prefer DiagnosticBuilder over Diagnostic in diagnostic modifiers.
There are lots of functions that modify a diagnostic. This can be via a
`&mut Diagnostic` or a `&mut DiagnosticBuilder`, because the latter type
wraps the former and impls `DerefMut`.

This commit converts all the `&mut Diagnostic` occurrences to `&mut
DiagnosticBuilder`. This is a step towards greatly simplifying
`Diagnostic`. Some of the relevant function are made generic, because
they deal with both errors and warnings. No function bodies are changed,
because all the modifier methods are available on both `Diagnostic` and
`DiagnosticBuilder`.
2024-02-19 20:23:20 +11:00
..
diagnostics.rs Prefer DiagnosticBuilder over Diagnostic in diagnostic modifiers. 2024-02-19 20:23:20 +11:00
mod.rs Add ErrorGuaranteed to ast::LitKind::Err, token::LitKind::Err. 2024-02-15 14:46:08 +11:00
tokentrees.rs Fix lifetimes in StringReader. 2024-01-11 16:55:10 +11:00
unescape_error_reporting.rs Make emit_unescape_error return Option<ErrorGuaranteed>. 2024-02-15 12:58:18 +11:00
unicode_chars.rs Fix lifetimes in StringReader. 2024-01-11 16:55:10 +11:00