Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f0fd9cd
implement Extend<{Group, Literal, Punct, Ident}> for TokenStream
Qelxiros Aug 21, 2025
ff7081e
Update library/proc_macro/src/lib.rs
Qelxiros Aug 26, 2025
215c936
Promote armv7a-none-eabihf to Tier 2
thejpster Sep 7, 2025
89a5bb6
Raise armv8r-none-eabihf to Tier 2
thejpster Sep 7, 2025
bfddf29
Update target spec to say Tier 2.
thejpster Sep 13, 2025
d6fdadb
Mitigate `thread_local!` shadowing issues
Jules-Bertholet Oct 3, 2025
f3f8385
Use the same directive lines for EarlyProps and ignore/only/needs
Zalathar Oct 8, 2025
690071c
Add regression test for 147485
dianqk Oct 9, 2025
9462e73
MIR validation: ensure that debuginfo records are not emitted for loc…
dianqk Oct 9, 2025
b2e81b0
Replace locals in debuginfo records during ref_prop
dianqk Oct 9, 2025
5ab4e18
remove `#[rustc_inherit_overflow_checks]` from `is_multiple_of`
folkertdev Oct 10, 2025
6660d75
Move to the tier 3 table
saethlin Oct 10, 2025
c86474c
Adding a regression test (const promotion with Option<Ordering>)
borsakv Aug 20, 2025
b7c2b3d
Remove StatementKind::Deinit.
cjgillot Oct 10, 2025
ce671f9
Update rustc-perf submodule
Kobzol Oct 9, 2025
1ee2c58
Replace locals in debuginfo records during dest_prop
dianqk Oct 10, 2025
4eccd02
Stabilize unsigned_nonzero_div_ceil
tyilo Oct 10, 2025
486fae1
Rollup merge of #145651 - borsakv:139093, r=cjgillot
dianqk Oct 10, 2025
6967a85
Rollup merge of #145722 - Qelxiros:112815-tokenstream-extend, r=dtolnay
dianqk Oct 10, 2025
020fede
Rollup merge of #146520 - thejpster:promote-armv8r-none-eabi, r=petro…
dianqk Oct 10, 2025
e1af13b
Rollup merge of #146522 - thejpster:promote-armv7a-none-eabihf, r=pet…
dianqk Oct 10, 2025
b017808
Rollup merge of #147289 - Jules-Bertholet:thread_local-shadow-mitigat…
dianqk Oct 10, 2025
046260e
Rollup merge of #147515 - Kobzol:update-rustc-perf, r=lqd,nnethercote
dianqk Oct 10, 2025
cfc27fb
Rollup merge of #147522 - Zalathar:directive, r=jieyouxu
dianqk Oct 10, 2025
fce1bea
Rollup merge of #147525 - dianqk:ref_prop_debuginfo, r=cjgillot
dianqk Oct 10, 2025
0ef3d20
Rollup merge of #147544 - cjgillot:nodeinit, r=saethlin
dianqk Oct 10, 2025
38a5143
Rollup merge of #147551 - folkertdev:is-multiple-of-overflow-checks, …
dianqk Oct 10, 2025
6d8272f
Rollup merge of #147553 - saethlin:wasip3-tier-3, r=petrochenkov
dianqk Oct 10, 2025
ab7d63a
Rollup merge of #147562 - tyilo:stabilize-unsigned_nonzero_div_ceil, …
dianqk Oct 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion compiler/rustc_borrowck/src/dataflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ impl<'tcx> rustc_mir_dataflow::Analysis<'tcx> for Borrows<'_, 'tcx> {

mir::StatementKind::FakeRead(..)
| mir::StatementKind::SetDiscriminant { .. }
| mir::StatementKind::Deinit(..)
| mir::StatementKind::StorageLive(..)
| mir::StatementKind::Retag { .. }
| mir::StatementKind::PlaceMention(..)
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/def_use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub(crate) fn categorize(context: PlaceContext) -> Option<DefUse> {
// Backwards incompatible drop hint is not a use, just a marker for linting.
PlaceContext::NonUse(NonUseContext::BackwardIncompatibleDropHint) => None,

PlaceContext::MutatingUse(MutatingUseContext::Deinit | MutatingUseContext::SetDiscriminant) => {
PlaceContext::MutatingUse(MutatingUseContext::SetDiscriminant) => {
bug!("These statements are not allowed in this MIR phase")
}
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,6 @@ impl<'a, 'tcx> ResultsVisitor<'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<'a,
}
StatementKind::Nop
| StatementKind::Retag { .. }
| StatementKind::Deinit(..)
| StatementKind::SetDiscriminant { .. } => {
bug!("Statement not allowed in this MIR phase")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ impl<'a, 'tcx> Visitor<'tcx> for LoanInvalidationsGenerator<'a, 'tcx> {
StatementKind::ConstEvalCounter
| StatementKind::Nop
| StatementKind::Retag { .. }
| StatementKind::Deinit(..)
| StatementKind::BackwardIncompatibleDropHint { .. }
| StatementKind::SetDiscriminant { .. } => {
bug!("Statement not allowed in this MIR phase")
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,6 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
| StatementKind::BackwardIncompatibleDropHint { .. }
| StatementKind::Nop => {}
StatementKind::Intrinsic(box NonDivergingIntrinsic::CopyNonOverlapping(..))
| StatementKind::Deinit(..)
| StatementKind::SetDiscriminant { .. } => {
bug!("Statement not allowed in this MIR phase")
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_cranelift/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,6 @@ fn codegen_stmt<'tcx>(fx: &mut FunctionCx<'_, '_, 'tcx>, cur_block: Block, stmt:
}
StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)
| StatementKind::Deinit(_)
| StatementKind::ConstEvalCounter
| StatementKind::Nop
| StatementKind::FakeRead(..)
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_cranelift/src/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,6 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
StatementKind::Assign(_)
| StatementKind::FakeRead(_)
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(_)
| StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)
| StatementKind::Retag(_, _)
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_ssa/src/mir/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ impl<'a, 'b, 'tcx, Bx: BuilderMethods<'b, 'tcx>> Visitor<'tcx> for LocalAnalyzer

PlaceContext::MutatingUse(
MutatingUseContext::Store
| MutatingUseContext::Deinit
| MutatingUseContext::SetDiscriminant
| MutatingUseContext::AsmOutput
| MutatingUseContext::Borrow
Expand Down
5 changes: 0 additions & 5 deletions compiler/rustc_codegen_ssa/src/mir/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
mir::StatementKind::SetDiscriminant { box ref place, variant_index } => {
self.codegen_place(bx, place.as_ref()).codegen_set_discr(bx, variant_index);
}
mir::StatementKind::Deinit(..) => {
// For now, don't codegen this to anything. In the future it may be worth
// experimenting with what kind of information we can emit to LLVM without hurting
// perf here
}
mir::StatementKind::StorageLive(local) => {
if let LocalRef::Place(cg_place) = self.locals[local] {
cg_place.storage_live(bx);
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_const_eval/src/check_consts/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,6 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
match statement.kind {
StatementKind::Assign(..)
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(..)
| StatementKind::FakeRead(..)
| StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)
Expand Down
5 changes: 0 additions & 5 deletions compiler/rustc_const_eval/src/interpret/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
self.write_discriminant(*variant_index, &dest)?;
}

Deinit(place) => {
let dest = self.eval_place(**place)?;
self.write_uninit(&dest)?;
}

// Mark locals as alive
StorageLive(local) => {
self.storage_live(*local)?;
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_middle/src/mir/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,6 @@ impl Debug for Statement<'_> {
SetDiscriminant { ref place, variant_index } => {
write!(fmt, "discriminant({place:?}) = {variant_index:?}")
}
Deinit(ref place) => write!(fmt, "Deinit({place:?})"),
PlaceMention(ref place) => {
write!(fmt, "PlaceMention({place:?})")
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_middle/src/mir/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ impl<'tcx> StatementKind<'tcx> {
StatementKind::Assign(..) => "Assign",
StatementKind::FakeRead(..) => "FakeRead",
StatementKind::SetDiscriminant { .. } => "SetDiscriminant",
StatementKind::Deinit(..) => "Deinit",
StatementKind::StorageLive(..) => "StorageLive",
StatementKind::StorageDead(..) => "StorageDead",
StatementKind::Retag(..) => "Retag",
Expand Down
6 changes: 0 additions & 6 deletions compiler/rustc_middle/src/mir/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ pub enum RuntimePhase {
/// And the following variants are allowed:
/// * [`StatementKind::Retag`]
/// * [`StatementKind::SetDiscriminant`]
/// * [`StatementKind::Deinit`]
///
/// Furthermore, `Copy` operands are allowed for non-`Copy` types.
Initial = 0,
Expand Down Expand Up @@ -362,11 +361,6 @@ pub enum StatementKind<'tcx> {
/// the type.
SetDiscriminant { place: Box<Place<'tcx>>, variant_index: VariantIdx },

/// Deinitializes the place.
///
/// This writes `uninit` bytes to the entire place.
Deinit(Box<Place<'tcx>>),

/// `StorageLive` and `StorageDead` statements mark the live range of a local.
///
/// At any point during the execution of a function, each local is either allocated or
Expand Down
17 changes: 4 additions & 13 deletions compiler/rustc_middle/src/mir/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,13 +445,6 @@ macro_rules! make_mir_visitor {
location
);
}
StatementKind::Deinit(place) => {
self.visit_place(
place,
PlaceContext::MutatingUse(MutatingUseContext::Deinit),
location
)
}
StatementKind::StorageLive(local) => {
self.visit_local(
$(& $mutability)? *local,
Expand Down Expand Up @@ -1098,6 +1091,10 @@ macro_rules! super_body {
}
}

for var_debug_info in &$($mutability)? $body.var_debug_info {
$self.visit_var_debug_info(var_debug_info);
}

for (bb, data) in basic_blocks_iter!($body, $($mutability, $invalidate)?) {
$self.visit_basic_block_data(bb, data);
}
Expand Down Expand Up @@ -1127,10 +1124,6 @@ macro_rules! super_body {
);
}

for var_debug_info in &$($mutability)? $body.var_debug_info {
$self.visit_var_debug_info(var_debug_info);
}

$self.visit_span($(& $mutability)? $body.span);

if let Some(required_consts) = &$($mutability)? $body.required_consts {
Expand Down Expand Up @@ -1372,8 +1365,6 @@ pub enum MutatingUseContext {
Store,
/// Appears on `SetDiscriminant`
SetDiscriminant,
/// Appears on `Deinit`
Deinit,
/// Output operand of an inline assembly block.
AsmOutput,
/// Destination of a call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ impl<'a, 'tcx> ParseCtxt<'a, 'tcx> {
let op = self.parse_operand(args[0])?;
Ok(StatementKind::Intrinsic(Box::new(NonDivergingIntrinsic::Assume(op))))
},
@call(mir_deinit, args) => {
Ok(StatementKind::Deinit(Box::new(self.parse_place(args[0])?)))
},
@call(mir_retag, args) => {
Ok(StatementKind::Retag(RetagKind::Default, Box::new(self.parse_place(args[0])?)))
},
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_mir_dataflow/src/impls/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ impl DefUse {
MutatingUseContext::Call
| MutatingUseContext::Yield
| MutatingUseContext::AsmOutput
| MutatingUseContext::Store
| MutatingUseContext::Deinit,
| MutatingUseContext::Store,
) => {
// Treat derefs as a use of the base local. `*p = 4` is not a def of `p` but a use.
if place.is_indirect() {
Expand Down Expand Up @@ -238,7 +237,7 @@ impl<'a> MaybeTransitiveLiveLocals<'a> {
&& (!debuginfo_locals.contains(place.local)
|| (place.as_local().is_some() && stmt_kind.as_debuginfo().is_some())))
.then_some(*place),
StatementKind::SetDiscriminant { place, .. } | StatementKind::Deinit(place) => {
StatementKind::SetDiscriminant { place, .. } => {
(!debuginfo_locals.contains(place.local)).then_some(**place)
}
StatementKind::FakeRead(_)
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ impl<'tcx> Analysis<'tcx> for MaybeRequiresStorage<'_, 'tcx> {

// If a place is assigned to in a statement, it needs storage for that statement.
StatementKind::Assign(box (place, _))
| StatementKind::SetDiscriminant { box place, .. }
| StatementKind::Deinit(box place) => {
| StatementKind::SetDiscriminant { box place, .. } => {
state.gen_(place.local);
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_mir_dataflow/src/move_paths/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ impl<'a, 'tcx, F: Fn(Ty<'tcx>) -> bool> MoveDataBuilder<'a, 'tcx, F> {
self.gather_move(Place::from(*local));
}
}
StatementKind::SetDiscriminant { .. } | StatementKind::Deinit(..) => {
StatementKind::SetDiscriminant { .. } => {
span_bug!(
stmt.source_info.span,
"SetDiscriminant/Deinit should not exist during borrowck"
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_mir_transform/src/coroutine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,6 @@ impl<'tcx> Visitor<'tcx> for EnsureCoroutineFieldAssignmentsNeverAlias<'_> {

StatementKind::FakeRead(..)
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(..)
| StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)
| StatementKind::Retag(..)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ fn filtered_statement_span(statement: &Statement<'_>) -> Option<Span> {
)
| StatementKind::Assign(_)
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(..)
| StatementKind::Retag(_, _)
| StatementKind::PlaceMention(..)
| StatementKind::AscribeUserType(_, _) => Some(statement.source_info.span),
Expand Down
5 changes: 1 addition & 4 deletions compiler/rustc_mir_transform/src/cross_crate_inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,7 @@ impl<'tcx> Visitor<'tcx> for CostChecker<'_, 'tcx> {
fn visit_statement(&mut self, statement: &Statement<'tcx>, _: Location) {
// Don't count StorageLive/StorageDead in the inlining cost.
match statement.kind {
StatementKind::StorageLive(_)
| StatementKind::StorageDead(_)
| StatementKind::Deinit(_)
| StatementKind::Nop => {}
StatementKind::StorageLive(_) | StatementKind::StorageDead(_) | StatementKind::Nop => {}
_ => self.statements += 1,
}
}
Expand Down
4 changes: 0 additions & 4 deletions compiler/rustc_mir_transform/src/dataflow_const_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ impl<'a, 'tcx> ConstAnalysis<'a, 'tcx> {
FlatSet::<Scalar>::BOTTOM,
);
}
StatementKind::Deinit(box place) => {
// Deinit makes the place uninitialized.
state.flood_with(place.as_ref(), &self.map, FlatSet::<Scalar>::BOTTOM);
}
StatementKind::Retag(..) => {
// We don't track references.
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_mir_transform/src/dest_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ impl<'tcx> MutVisitor<'tcx> for Merger<'tcx> {
if self.merged_locals.contains(*local) =>
{
statement.make_nop(true);
return;
}
_ => (),
};
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_mir_transform/src/jump_threading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ impl<'a, 'tcx> TOFinder<'a, 'tcx> {
stmt: &Statement<'tcx>,
) -> Option<(Place<'tcx>, Option<TrackElem>)> {
match stmt.kind {
StatementKind::Assign(box (place, _))
| StatementKind::Deinit(box place) => Some((place, None)),
StatementKind::Assign(box (place, _)) => Some((place, None)),
StatementKind::SetDiscriminant { box place, variant_index: _ } => {
Some((place, Some(TrackElem::Discriminant)))
}
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_mir_transform/src/known_panics_lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,6 @@ impl<'tcx> Visitor<'tcx> for CanConstProp {
// mutations of the same local via `Store`
| MutatingUse(MutatingUseContext::Call)
| MutatingUse(MutatingUseContext::AsmOutput)
| MutatingUse(MutatingUseContext::Deinit)
// Actual store that can possibly even propagate a value
| MutatingUse(MutatingUseContext::Store)
| MutatingUse(MutatingUseContext::SetDiscriminant) => {
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_mir_transform/src/large_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ impl<'tcx> crate::MirPass<'tcx> for EnumSizeOpt {
Rvalue::Cast(CastKind::PtrToPtr, Operand::Copy(src), src_cast_ty),
)));

let deinit_old = StatementKind::Deinit(Box::new(dst));

let copy_bytes = StatementKind::Intrinsic(Box::new(
NonDivergingIntrinsic::CopyNonOverlapping(CopyNonOverlapping {
src: Operand::Copy(src_cast_place),
Expand All @@ -148,7 +146,6 @@ impl<'tcx> crate::MirPass<'tcx> for EnumSizeOpt {
dst_cast,
src_ptr,
src_cast,
deinit_old,
copy_bytes,
store_dead,
];
Expand Down
45 changes: 36 additions & 9 deletions compiler/rustc_mir_transform/src/ref_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ fn compute_replacement<'tcx>(
return Replacer {
tcx,
targets: finder.targets,
remap_var_debug_infos: IndexVec::from_elem(None, body.local_decls()),
storage_to_remove,
allowed_replacements,
any_replacement: false,
Expand Down Expand Up @@ -381,6 +382,7 @@ fn fully_replaceable_locals(ssa: &SsaLocals) -> DenseBitSet<Local> {
struct Replacer<'tcx> {
tcx: TyCtxt<'tcx>,
targets: IndexVec<Local, Value<'tcx>>,
remap_var_debug_infos: IndexVec<Local, Option<Local>>,
storage_to_remove: DenseBitSet<Local>,
allowed_replacements: FxHashSet<(Local, Location)>,
any_replacement: bool,
Expand All @@ -392,21 +394,45 @@ impl<'tcx> MutVisitor<'tcx> for Replacer<'tcx> {
}

fn visit_var_debug_info(&mut self, debuginfo: &mut VarDebugInfo<'tcx>) {
// If the debuginfo is a pointer to another place
// and it's a reborrow: see through it
while let VarDebugInfoContents::Place(ref mut place) = debuginfo.value
if let VarDebugInfoContents::Place(ref mut place) = debuginfo.value
&& place.projection.is_empty()
&& let Value::Pointer(target, _) = self.targets[place.local]
&& let &[PlaceElem::Deref] = &target.projection[..]
{
*place = Place::from(target.local);
self.any_replacement = true;
let mut new_local = place.local;

// If the debuginfo is a pointer to another place
// and it's a reborrow: see through it
while let Value::Pointer(target, _) = self.targets[new_local]
&& let &[PlaceElem::Deref] = &target.projection[..]
{
new_local = target.local;
}
if place.local != new_local {
self.remap_var_debug_infos[place.local] = Some(new_local);
place.local = new_local;

self.any_replacement = true;
}
}

// Simplify eventual projections left inside `debuginfo`.
self.super_var_debug_info(debuginfo);
}

fn visit_statement_debuginfo(
&mut self,
stmt_debuginfo: &mut StmtDebugInfo<'tcx>,
location: Location,
) {
let local = match stmt_debuginfo {
StmtDebugInfo::AssignRef(local, _) | StmtDebugInfo::InvalidAssign(local) => local,
};
if let Some(target) = self.remap_var_debug_infos[*local] {
*local = target;
self.any_replacement = true;
}
self.super_statement_debuginfo(stmt_debuginfo, location);
}

fn visit_place(&mut self, place: &mut Place<'tcx>, ctxt: PlaceContext, loc: Location) {
loop {
let Some((&PlaceElem::Deref, rest)) = place.projection.split_first() else { return };
Expand Down Expand Up @@ -437,8 +463,9 @@ impl<'tcx> MutVisitor<'tcx> for Replacer<'tcx> {
{
stmt.make_nop(true);
}
// Do not remove assignments as they may still be useful for debuginfo.
_ => self.super_statement(stmt, loc),
_ => {}
}
// Do not remove assignments as they may still be useful for debuginfo.
self.super_statement(stmt, loc);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ impl RemoveNoopLandingPads {

StatementKind::Assign { .. }
| StatementKind::SetDiscriminant { .. }
| StatementKind::Deinit(..)
| StatementKind::Intrinsic(..)
| StatementKind::Retag { .. } => {
return false;
Expand Down
Loading
Loading