Skip to content

Commit e16d6a6

Browse files
committed
Fix missing return in optimization_applies()
1 parent 24bfdc9 commit e16d6a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_mir/transform/simplify_try.rs

+1
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ fn optimization_applies<'tcx>(
302302
// Verify the assigment chain consists of the form b = a; c = b; d = c; etc...
303303
if opt_info.field_tmp_assignments.is_empty() {
304304
trace!("NO: no assignments found");
305+
return false;
305306
}
306307
let mut last_assigned_to = opt_info.field_tmp_assignments[0].1;
307308
let source_local = last_assigned_to;

0 commit comments

Comments
 (0)