Bump indexmap

`swap` has been deprecated in favour of `swap_remove` - the behaviour
is the same though.
This commit is contained in:
clubby789 2024-01-28 20:53:28 +00:00
parent a84bb95a1f
commit 4de3a3af4a
25 changed files with 65 additions and 34 deletions

View file

@ -707,7 +707,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;