Bump indexmap
`swap` has been deprecated in favour of `swap_remove` - the behaviour is the same though.
This commit is contained in:
parent
a84bb95a1f
commit
4de3a3af4a
25 changed files with 65 additions and 34 deletions
|
@ -122,7 +122,8 @@ impl<K: Hash + Eq, V> interpret::AllocMap<K, V> for FxIndexMap<K, V> {
|
|||
where
|
||||
K: Borrow<Q>,
|
||||
{
|
||||
FxIndexMap::remove(self, k)
|
||||
// FIXME(#120456) - is `swap_remove` correct?
|
||||
FxIndexMap::swap_remove(self, k)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
|
|
|
@ -49,7 +49,8 @@ fn intern_shallow<'rt, 'mir, 'tcx, T, M: CompileTimeMachine<'mir, 'tcx, T>>(
|
|||
) -> Result<impl Iterator<Item = CtfeProvenance> + 'tcx, ()> {
|
||||
trace!("intern_shallow {:?}", alloc_id);
|
||||
// remove allocation
|
||||
let Some((_kind, mut alloc)) = ecx.memory.alloc_map.remove(&alloc_id) else {
|
||||
// FIXME(#120456) - is `swap_remove` correct?
|
||||
let Some((_kind, mut alloc)) = ecx.memory.alloc_map.swap_remove(&alloc_id) else {
|
||||
return Err(());
|
||||
};
|
||||
// Set allocation mutability as appropriate. This is used by LLVM to put things into
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue