diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-01 10:13:24 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-02-19 20:23:20 +1100 |
| commit | a16dbd7339b63ed3b6660117dfa51696712cd1b5 (patch) | |
| tree | cb63cc1081ccfd4697f42effc37525bbd367b2d0 /tests/rustdoc-js-std/full-path-function.js | |
| parent | d88ad9e6b7b07d177c28bf7c65c3bf44759338b4 (diff) | |
| download | rust-a16dbd7339b63ed3b6660117dfa51696712cd1b5.tar.gz rust-a16dbd7339b63ed3b6660117dfa51696712cd1b5.zip | |
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`.
Diffstat (limited to 'tests/rustdoc-js-std/full-path-function.js')
0 files changed, 0 insertions, 0 deletions
