Skip to content

Commit 44e5eb1

Browse files
committed
readability improvement
1 parent d6ac8bb commit 44e5eb1

File tree

1 file changed

+4
-5
lines changed
  • compiler/rustc_codegen_ssa/src/mir

1 file changed

+4
-5
lines changed

compiler/rustc_codegen_ssa/src/mir/block.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
318318
discr: &mir::Operand<'tcx>,
319319
) -> Option<mir::ExpectKind> {
320320
// First do a quick test if there are any `expect` intrinsics in the BB.
321-
322-
let Some(discr) = discr.place() else {
323-
return None;
324-
};
325-
326321
if let Some(ref blocks) = self.blocks_with_expect {
327322
if !blocks.contains(bb) {
328323
return None;
@@ -331,6 +326,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
331326
return None;
332327
}
333328

329+
let Some(discr) = discr.place() else {
330+
return None;
331+
};
332+
334333
// There are `expect` intrinsics in the BB, so we need to do the full analysis.
335334

336335
// Groups of variables which have the same value

0 commit comments

Comments
 (0)