Skip to content

Commit cc1c099

Browse files
committed
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`
2 parents 7508c3e + 9b73db3 commit cc1c099

File tree

31 files changed

+799
-819
lines changed

31 files changed

+799
-819
lines changed

Cargo.lock

Lines changed: 613 additions & 601 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
@@ -58,7 +58,8 @@ impl GatherUsedMutsVisitor<'_, '_, '_> {
5858
// be those that were never initialized - we will consider those as being used as
5959
// they will either have been removed by unreachable code optimizations; or linted
6060
// as unused variables.
61-
self.never_initialized_mut_locals.remove(&into.local);
61+
// FIXME(#120456) - is `swap_remove` correct?
62+
self.never_initialized_mut_locals.swap_remove(&into.local);
6263
}
6364
}
6465

compiler/rustc_codegen_ssa/src/target_features.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ fn asm_target_features(tcx: TyCtxt<'_>, did: DefId) -> &FxIndexSet<Symbol> {
106106
match attrs.instruction_set {
107107
None => {}
108108
Some(InstructionSetAttr::ArmA32) => {
109-
target_features.remove(&sym::thumb_mode);
109+
// FIXME(#120456) - is `swap_remove` correct?
110+
target_features.swap_remove(&sym::thumb_mode);
110111
}
111112
Some(InstructionSetAttr::ArmT32) => {
112113
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
@@ -122,7 +122,8 @@ impl<K: Hash + Eq, V> interpret::AllocMap<K, V> for FxIndexMap<K, V> {
122122
where
123123
K: Borrow<Q>,
124124
{
125-
FxIndexMap::remove(self, k)
125+
// FIXME(#120456) - is `swap_remove` correct?
126+
FxIndexMap::swap_remove(self, k)
126127
}
127128

128129
#[inline(always)]

compiler/rustc_const_eval/src/interpret/intern.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ fn intern_shallow<'rt, 'mir, 'tcx, T, M: CompileTimeMachine<'mir, 'tcx, T>>(
4949
) -> Result<impl Iterator<Item = CtfeProvenance> + 'tcx, ()> {
5050
trace!("intern_shallow {:?}", alloc_id);
5151
// remove allocation
52-
let Some((_kind, mut alloc)) = ecx.memory.alloc_map.remove(&alloc_id) else {
52+
// FIXME(#120456) - is `swap_remove` correct?
53+
let Some((_kind, mut alloc)) = ecx.memory.alloc_map.swap_remove(&alloc_id) else {
5354
return Err(());
5455
};
5556
// 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
@@ -737,7 +737,8 @@ impl DiagCtxt {
737737
pub fn steal_diagnostic(&self, span: Span, key: StashKey) -> Option<DiagnosticBuilder<'_, ()>> {
738738
let mut inner = self.inner.borrow_mut();
739739
let key = (span.with_parent(None), key);
740-
let diag = inner.stashed_diagnostics.remove(&key)?;
740+
// FIXME(#120456) - is `swap_remove` correct?
741+
let diag = inner.stashed_diagnostics.swap_remove(&key)?;
741742
if diag.is_error() {
742743
if diag.is_lint.is_none() {
743744
inner.stashed_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)