rust/compiler/rustc_expand/src
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
..
mbe Prefer DiagnosticBuilder over Diagnostic in diagnostic modifiers. 2024-02-19 20:23:20 +11:00
mut_visit rustc_ast: Turn MutVisitor::token_visiting_enabled into a constant 2021-10-18 00:23:24 +03:00
parse Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
tokenstream Remove TokenStreamBuilder. 2022-10-05 12:42:54 +11:00
base.rs Rollup merge of #121109 - nnethercote:TyKind-Err-guar-2, r=oli-obk 2024-02-16 00:27:32 +01:00
build.rs Add async bound modifier to enable async Fn bounds 2024-01-31 16:59:19 +00:00
config.rs Rollup merge of #117420 - Jules-Bertholet:internal-unstable-stmt-expr-attributes, r=petrochenkov 2024-01-26 14:43:29 +01:00
errors.rs Stop using String for error codes. 2024-01-29 07:41:41 +11:00
expand.rs Add check for ui_testing via promoting parameters from ParseSess to Session 2024-01-13 12:11:13 -05:00
lib.rs Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
mbe.rs Add spacing information to delimiters. 2023-12-11 09:36:40 +11:00
module.rs Make DiagnosticBuilder::emit consuming. 2024-01-08 15:24:49 +11:00
placeholders.rs Give VariantData::Struct named fields, to clairfy recovered. 2023-12-20 00:07:34 +00:00
proc_macro_server.rs Add ErrorGuaranteed to ast::LitKind::Err, token::LitKind::Err. 2024-02-15 14:46:08 +11:00
proc_macro.rs Add check for ui_testing via promoting parameters from ParseSess to Session 2024-01-13 12:11:13 -05:00
tests.rs Rename EmitterWriter as HumanEmitter. 2024-01-05 10:02:40 +11:00