diff options
| author | bors <bors@rust-lang.org> | 2022-03-26 00:54:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-03-26 00:54:54 +0000 |
| commit | c74925438c77e53ac715db6382ac4c196da8d403 (patch) | |
| tree | 63cd45b6322281c1a7974ff80d2e0a596a87e5af /compiler/rustc_codegen_ssa/src | |
| parent | a2ebd5a1f12f4242edf66cbbd471c421bec62753 (diff) | |
| parent | f7d5b7afb774061be70b86c7e10a7434b1de7888 (diff) | |
| download | rust-c74925438c77e53ac715db6382ac4c196da8d403.tar.gz rust-c74925438c77e53ac715db6382ac4c196da8d403.zip | |
Auto merge of #95149 - cjgillot:once-diag, r=estebank
Remove `Session::one_time_diagnostic`
This is untracked mutable state, which modified the behaviour of queries.
It was used for 2 things: some full-blown errors, but mostly for lint declaration notes ("the lint level is defined here" notes).
It is replaced by the diagnostic deduplication infra which already exists in the diagnostic emitter.
A new diagnostic level `OnceNote` is introduced specifically for lint notes, to deduplicate subdiagnostics.
As a drive-by, diagnostic emission takes a `&mut` to allow dropping the `SubDiagnostic`s.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/write.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs index e23572104c4..1d11e6dfbd2 100644 --- a/compiler/rustc_codegen_ssa/src/back/write.rs +++ b/compiler/rustc_codegen_ssa/src/back/write.rs @@ -1748,7 +1748,7 @@ impl SharedEmitterMain { if let Some(code) = diag.code { d.code(code); } - handler.emit_diagnostic(&d); + handler.emit_diagnostic(&mut d); } Ok(SharedEmitterMessage::InlineAsmError(cookie, msg, level, source)) => { let msg = msg.strip_prefix("error: ").unwrap_or(&msg); |
