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

Commit 88f19c6

Browse files
committed
Auto merge of rust-lang#84864 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] 1.52.0 release This includes the release notes (rust-lang#84183) as well as cherry-picked commits from: * [beta] revert PR rust-lang#77885 rust-lang#84710 * [beta] remove assert_matches rust-lang#84759 * Revert PR 81473 to resolve (on beta) issues 81626 and 81658. rust-lang#83171 * [beta] rustdoc revert deref recur rust-lang#84868 * Fix ICE of for-loop mut borrowck where no suggestions are available rust-lang#83401 Additionally in "fresh work" we're also: * reverting: directly expose copy and copy_nonoverlapping intrinsics rust-lang#81238 to avoid rust-lang#84297 on 1.52
2 parents 9a1dfd2 + 47c7b9c commit 88f19c6

File tree

69 files changed

+830
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+830
-940
lines changed

RELEASES.md

Lines changed: 343 additions & 11 deletions
Large diffs are not rendered by default.

compiler/rustc_codegen_ssa/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2-
#![feature(assert_matches)]
32
#![feature(bool_to_option)]
43
#![feature(box_patterns)]
54
#![feature(drain_filter)]

compiler/rustc_middle/src/ich/impls_syntax.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ impl<'ctx> rustc_ast::HashStableContext for StableHashingContext<'ctx> {
4545
item.hash_stable(self, hasher);
4646
style.hash_stable(self, hasher);
4747
span.hash_stable(self, hasher);
48-
assert_matches!(
49-
tokens.as_ref(),
50-
None,
51-
"Tokens should have been removed during lowering!"
52-
);
48+
assert!(tokens.as_ref().is_none(), "Tokens should have been removed during lowering!");
5349
} else {
5450
unreachable!();
5551
}

compiler/rustc_middle/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
2525
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2626
#![feature(array_windows)]
27-
#![feature(assert_matches)]
2827
#![feature(backtrace)]
2928
#![feature(bool_to_option)]
3029
#![feature(box_patterns)]

compiler/rustc_middle/src/mir/interpret/allocation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ impl<'tcx, Tag: Copy, Extra: AllocationExtra<Tag>> Allocation<Tag, Extra> {
339339
for dest in bytes {
340340
*dest = src.next().expect("iterator was shorter than it said it would be");
341341
}
342-
assert_matches!(src.next(), None, "iterator was longer than it said it would be");
342+
assert!(src.next().is_none(), "iterator was longer than it said it would be");
343343
Ok(())
344344
}
345345

compiler/rustc_mir/src/borrow_check/diagnostics/mutability_errors.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -642,15 +642,18 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
642642
.starts_with(&original_method_ident.name.to_string())
643643
})
644644
.map(|ident| format!("{}()", ident))
645+
.peekable()
645646
});
646647

647-
if let Some(suggestions) = opt_suggestions {
648-
err.span_suggestions(
649-
path_segment.ident.span,
650-
&format!("use mutable method"),
651-
suggestions,
652-
Applicability::MaybeIncorrect,
653-
);
648+
if let Some(mut suggestions) = opt_suggestions {
649+
if suggestions.peek().is_some() {
650+
err.span_suggestions(
651+
path_segment.ident.span,
652+
&format!("use mutable method"),
653+
suggestions,
654+
Applicability::MaybeIncorrect,
655+
);
656+
}
654657
}
655658
}
656659
};

compiler/rustc_mir/src/interpret/memory.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -854,11 +854,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
854854
Some(ptr) => ptr,
855855
None => {
856856
// zero-sized access
857-
assert_matches!(
858-
src.next(),
859-
None,
860-
"iterator said it was empty but returned an element"
861-
);
857+
assert!(src.next().is_none(), "iterator said it was empty but returned an element");
862858
return Ok(());
863859
}
864860
};
@@ -884,11 +880,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
884880
Some(ptr) => ptr,
885881
None => {
886882
// zero-sized access
887-
assert_matches!(
888-
src.next(),
889-
None,
890-
"iterator said it was empty but returned an element"
891-
);
883+
assert!(src.next().is_none(), "iterator said it was empty but returned an element");
892884
return Ok(());
893885
}
894886
};
@@ -902,7 +894,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'mir, 'tcx, M> {
902894
let offset_ptr = ptr.offset(Size::from_bytes(idx) * 2, &tcx)?; // `Size` multiplication
903895
allocation.write_scalar(&tcx, offset_ptr, val.into(), Size::from_bytes(2))?;
904896
}
905-
assert_matches!(src.next(), None, "iterator was longer than it said it would be");
897+
assert!(src.next().is_none(), "iterator was longer than it said it would be");
906898
Ok(())
907899
}
908900

compiler/rustc_mir/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Rust MIR: a lowered representation of Rust.
77
#![feature(nll)]
88
#![feature(in_band_lifetimes)]
99
#![feature(array_windows)]
10-
#![feature(assert_matches)]
1110
#![feature(bindings_after_at)]
1211
#![feature(bool_to_option)]
1312
#![feature(box_patterns)]

compiler/rustc_passes/src/dead.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -133,22 +133,6 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
133133
}
134134
}
135135

136-
fn handle_assign(&mut self, expr: &'tcx hir::Expr<'tcx>) {
137-
if self
138-
.typeck_results()
139-
.expr_adjustments(expr)
140-
.iter()
141-
.any(|adj| matches!(adj.kind, ty::adjustment::Adjust::Deref(_)))
142-
{
143-
self.visit_expr(expr);
144-
} else if let hir::ExprKind::Field(base, ..) = expr.kind {
145-
// Ignore write to field
146-
self.handle_assign(base);
147-
} else {
148-
self.visit_expr(expr);
149-
}
150-
}
151-
152136
fn handle_field_pattern_match(
153137
&mut self,
154138
lhs: &hir::Pat<'_>,
@@ -277,11 +261,6 @@ impl<'tcx> Visitor<'tcx> for MarkSymbolVisitor<'tcx> {
277261
hir::ExprKind::MethodCall(..) => {
278262
self.lookup_and_handle_method(expr.hir_id);
279263
}
280-
hir::ExprKind::Assign(ref left, ref right, ..) => {
281-
self.handle_assign(left);
282-
self.visit_expr(right);
283-
return;
284-
}
285264
hir::ExprKind::Field(ref lhs, ..) => {
286265
self.handle_field_access(&lhs, expr.hir_id);
287266
}

compiler/rustc_target/src/spec/i386_apple_ios.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ pub fn target() -> Target {
1212
arch: "x86".to_string(),
1313
options: TargetOptions {
1414
max_atomic_width: Some(64),
15-
stack_probes: StackProbeType::InlineOrCall { min_llvm_version_for_inline: (11, 0, 1) },
15+
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
16+
stack_probes: StackProbeType::Call,
1617
..base
1718
},
1819
}

0 commit comments

Comments
 (0)