diff options
| author | bors <bors@rust-lang.org> | 2024-02-14 05:27:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-14 05:27:31 +0000 |
| commit | cc1c0990ab6f7136d1d54fd008598095b2c53c66 (patch) | |
| tree | 184c4e41671f7d77392705f82804ae6ba455073d /compiler/rustc_errors | |
| parent | 7508c3e4c1349e3dd405547bc7dd8d9549e105b6 (diff) | |
| parent | 9b73db3f1c9bdfc567a3c24f1149fa8918b488a2 (diff) | |
| download | rust-cc1c0990ab6f7136d1d54fd008598095b2c53c66.tar.gz rust-cc1c0990ab6f7136d1d54fd008598095b2c53c66.zip | |
Auto merge of #120454 - clubby789:cargo-update, r=Nilstrieb
`cargo update` Run `cargo update`, with some pinning and fixes necessitated by that. This *should* unblock #112865 There's a couple of places where I only pinned a dependency in one location - this seems like a bit of a hack, but better than duplicating the FIXME across all `Cargo.toml` where a dependency is introduced. cc `@Nilstrieb`
Diffstat (limited to 'compiler/rustc_errors')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index b9e92dbb31c..38c6661377b 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -1635,7 +1635,8 @@ impl HumanEmitter { let mut to_add = FxHashMap::default(); for (depth, style) in depths { - if multilines.remove(&depth).is_none() { + // FIXME(#120456) - is `swap_remove` correct? + if multilines.swap_remove(&depth).is_none() { to_add.insert(depth, style); } } diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index fbd812609ee..b738ecb54ff 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -737,7 +737,8 @@ impl DiagCtxt { pub fn steal_diagnostic(&self, span: Span, key: StashKey) -> Option<DiagnosticBuilder<'_, ()>> { let mut inner = self.inner.borrow_mut(); let key = (span.with_parent(None), key); - let diag = inner.stashed_diagnostics.remove(&key)?; + // FIXME(#120456) - is `swap_remove` correct? + let diag = inner.stashed_diagnostics.swap_remove(&key)?; if diag.is_error() { if diag.is_lint.is_none() { inner.stashed_err_count -= 1; |
