Skip to content

Commit b7c19b0

Browse files
committed
remove redundant condition
1 parent a995e5a commit b7c19b0

File tree

1 file changed

+1
-4
lines changed
  • compiler/rustc_mir_transform/src

1 file changed

+1
-4
lines changed

compiler/rustc_mir_transform/src/gvn.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,6 +1258,7 @@ impl<'body, 'tcx> VnState<'body, 'tcx> {
12581258
}
12591259
}
12601260

1261+
#[instrument(level = "trace", skip(ecx), ret)]
12611262
fn op_to_prop_const<'tcx>(
12621263
ecx: &mut InterpCx<'tcx, DummyMachine>,
12631264
op: &OpTy<'tcx>,
@@ -1338,10 +1339,6 @@ impl<'tcx> VnState<'_, 'tcx> {
13381339
}
13391340

13401341
let op = self.evaluated[index].as_ref()?;
1341-
if op.layout.is_unsized() {
1342-
// Do not attempt to propagate unsized locals.
1343-
return None;
1344-
}
13451342

13461343
let value = op_to_prop_const(&mut self.ecx, op)?;
13471344

0 commit comments

Comments
 (0)