Skip to content

Commit 7a8a048

Browse files
committed
Remove early return that would likely have caused miscompilations if it ever happened
1 parent eeb1033 commit 7a8a048

File tree

1 file changed

+3
-13
lines changed
  • compiler/rustc_mir_build/src/build/matches

1 file changed

+3
-13
lines changed

compiler/rustc_mir_build/src/build/matches/test.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
154154
test: &Test<'tcx>,
155155
make_target_blocks: impl FnOnce(&mut Self) -> Vec<BasicBlock>,
156156
) {
157-
let place: Place<'tcx>;
158-
if let Ok(test_place_builder) = place_builder.try_upvars_resolved(self) {
159-
place = test_place_builder.into_place(self);
160-
} else {
161-
return;
162-
}
163-
debug!(
164-
"perform_test({:?}, {:?}: {:?}, {:?})",
165-
block,
166-
place,
167-
place.ty(&self.local_decls, self.tcx),
168-
test
169-
);
157+
let place = place_builder.into_place(self);
158+
let place_ty = place.ty(&self.local_decls, self.tcx);
159+
debug!(?place, ?place_ty,);
170160

171161
let source_info = self.source_info(test.span);
172162
match test.kind {

0 commit comments

Comments
 (0)