Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 2ef8623

Browse files
committed
Auto merge of rust-lang#120454 - clubby789:cargo-update, r=Nilstrieb
`cargo update` Run `cargo update`, with some pinning and fixes necessitated by that. This *should* unblock rust-lang#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`
2 parents 586893c + e24bde0 commit 2ef8623

File tree

31 files changed

+798
-800
lines changed

31 files changed

+798
-800
lines changed

Cargo.lock

Lines changed: 616 additions & 582 deletions
Large diffs are not rendered by default.

compiler/rustc_ast/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ version = "0.0.0"
44
edition = "2021"
55

66
[dependencies]
7+
# FIXME: bumping memchr to 2.7.1 causes linker errors in MSVC thin-lto
78
# tidy-alphabetical-start
89
bitflags = "2.4.1"
9-
memchr = "2.5.0"
10+
memchr = "=2.5.0"
1011
rustc_data_structures = { path = "../rustc_data_structures" }
1112
rustc_index = { path = "../rustc_index" }
1213
rustc_lexer = { path = "../rustc_lexer" }

compiler/rustc_borrowck/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2479,7 +2479,8 @@ mod diags {
24792479
&mut self,
24802480
span: Span,
24812481
) -> Option<(DiagnosticBuilder<'tcx>, usize)> {
2482-
self.diags.buffered_mut_errors.remove(&span)
2482+
// FIXME(#120456) - is `swap_remove` correct?
2483+
self.diags.buffered_mut_errors.swap_remove(&span)
24832484
}
24842485

24852486
pub fn buffer_mut_error(&mut self, span: Span, t: DiagnosticBuilder<'tcx>, count: usize) {

compiler/rustc_borrowck/src/used_muts.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ impl GatherUsedMutsVisitor<'_, '_, '_> {
6060
// be those that were never initialized - we will consider those as being used as
6161
// they will either have been removed by unreachable code optimizations; or linted
6262
// as unused variables.
63-
self.never_initialized_mut_locals.remove(&into.local);
63+
// FIXME(#120456) - is `swap_remove` correct?
64+
self.never_initialized_mut_locals.swap_remove(&into.local);
6465
}
6566
}
6667

compiler/rustc_codegen_ssa/src/target_features.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ fn asm_target_features(tcx: TyCtxt<'_>, did: DefId) -> &FxIndexSet<Symbol> {
104104
match attrs.instruction_set {
105105
None => {}
106106
Some(InstructionSetAttr::ArmA32) => {
107-
target_features.remove(&sym::thumb_mode);
107+
// FIXME(#120456) - is `swap_remove` correct?
108+
target_features.swap_remove(&sym::thumb_mode);
108109
}
109110
Some(InstructionSetAttr::ArmT32) => {
110111
target_features.insert(sym::thumb_mode);

compiler/rustc_const_eval/src/const_eval/machine.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ impl<K: Hash + Eq, V> interpret::AllocMap<K, V> for FxIndexMap<K, V> {
125125
where
126126
K: Borrow<Q>,
127127
{
128-
FxIndexMap::remove(self, k)
128+
// FIXME(#120456) - is `swap_remove` correct?
129+
FxIndexMap::swap_remove(self, k)
129130
}
130131

131132
#[inline(always)]

compiler/rustc_const_eval/src/interpret/intern.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ fn intern_shallow<'rt, 'mir, 'tcx, T, M: CompileTimeMachine<'mir, 'tcx, T>>(
5050
) -> Result<(), ()> {
5151
trace!("intern_shallow {:?}", alloc_id);
5252
// remove allocation
53-
let Some((_kind, mut alloc)) = ecx.memory.alloc_map.remove(&alloc_id) else {
53+
// FIXME(#120456) - is `swap_remove` correct?
54+
let Some((_kind, mut alloc)) = ecx.memory.alloc_map.swap_remove(&alloc_id) else {
5455
return Err(());
5556
};
5657
// Set allocation mutability as appropriate. This is used by LLVM to put things into

compiler/rustc_errors/src/emitter.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1635,7 +1635,8 @@ impl HumanEmitter {
16351635
let mut to_add = FxHashMap::default();
16361636

16371637
for (depth, style) in depths {
1638-
if multilines.remove(&depth).is_none() {
1638+
// FIXME(#120456) - is `swap_remove` correct?
1639+
if multilines.swap_remove(&depth).is_none() {
16391640
to_add.insert(depth, style);
16401641
}
16411642
}

compiler/rustc_errors/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,8 @@ impl DiagCtxt {
692692
pub fn steal_diagnostic(&self, span: Span, key: StashKey) -> Option<DiagnosticBuilder<'_, ()>> {
693693
let mut inner = self.inner.borrow_mut();
694694
let key = (span.with_parent(None), key);
695-
let diag = inner.stashed_diagnostics.remove(&key)?;
695+
// FIXME(#120456) - is `swap_remove` correct?
696+
let diag = inner.stashed_diagnostics.swap_remove(&key)?;
696697
if diag.is_error() {
697698
if diag.is_lint.is_some() {
698699
inner.lint_err_count -= 1;

compiler/rustc_hir_analysis/src/astconv/object_safety.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
218218
for def_ids in associated_types.values_mut() {
219219
for (projection_bound, span) in &projection_bounds {
220220
let def_id = projection_bound.projection_def_id();
221-
def_ids.remove(&def_id);
221+
// FIXME(#120456) - is `swap_remove` correct?
222+
def_ids.swap_remove(&def_id);
222223
if tcx.generics_require_sized_self(def_id) {
223224
tcx.emit_node_span_lint(
224225
UNUSED_ASSOCIATED_TYPE_BOUNDS,

0 commit comments

Comments
 (0)