rust/compiler/rustc_hir_analysis
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
..
src Prefer DiagnosticBuilder over Diagnostic in diagnostic modifiers. 2024-02-19 20:23:20 +11:00
Cargo.toml Use zip_eq to enforce that things being zipped have equal sizes 2024-01-14 20:01:12 +00:00
messages.ftl Auto merge of #121034 - obeis:improve-static-mut-ref, r=RalfJung 2024-02-18 08:00:34 +00:00
README.md rustc_typeck to rustc_hir_analysis 2022-09-27 10:37:23 +02:00

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.