diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-08 08:27:38 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-08 16:18:55 +1100 |
| commit | db09eb2d3accf8909ea2813ebb00c58c7f2fad64 (patch) | |
| tree | 0fe5ef70b5b716266069bdee8c6977e24878d4c1 /compiler/rustc_interface/src/callbacks.rs | |
| parent | 2d91c6d1bf900276de71a7bde89ffe9cffed59fa (diff) | |
| download | rust-db09eb2d3accf8909ea2813ebb00c58c7f2fad64.tar.gz rust-db09eb2d3accf8909ea2813ebb00c58c7f2fad64.zip | |
Remove `{DiagCtxt,DiagCtxtInner}::emit_diagnostic_without_consuming`.
They are no longer used, because
`{DiagCtxt,DiagCtxtInner}::emit_diagnostic` are used everywhere instead.
This also means `track_diagnostic` can become consuming.
Diffstat (limited to 'compiler/rustc_interface/src/callbacks.rs')
| -rw-r--r-- | compiler/rustc_interface/src/callbacks.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/callbacks.rs b/compiler/rustc_interface/src/callbacks.rs index ef00ced67ff..7458be2c86d 100644 --- a/compiler/rustc_interface/src/callbacks.rs +++ b/compiler/rustc_interface/src/callbacks.rs @@ -29,7 +29,7 @@ fn track_span_parent(def_id: rustc_span::def_id::LocalDefId) { /// This is a callback from `rustc_errors` as it cannot access the implicit state /// in `rustc_middle` otherwise. It is used when diagnostic messages are /// emitted and stores them in the current query, if there is one. -fn track_diagnostic(diagnostic: &mut Diagnostic, f: &mut dyn FnMut(&mut Diagnostic)) { +fn track_diagnostic(diagnostic: Diagnostic, f: &mut dyn FnMut(Diagnostic)) { tls::with_context_opt(|icx| { if let Some(icx) = icx { if let Some(diagnostics) = icx.diagnostics { |
