Skip to content

Commit f6a5b0b

Browse files
committed
Review nits.
1 parent 9e5c064 commit f6a5b0b

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

compiler/rustc_middle/src/mir/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ fn write_scope_tree(
430430
// Coroutine debuginfo.
431431
if let Some(layout) = body.coroutine_layout_raw() {
432432
for (field, name) in layout.field_names.iter_enumerated() {
433+
let source_info = layout.field_tys[field].source_info;
433434
if let Some(name) = name
434-
&& let source_info = layout.field_tys[field].source_info
435435
&& source_info.scope == parent
436436
{
437437
let indented_debug_info =

compiler/rustc_mir_transform/src/coroutine.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,9 +1183,8 @@ fn can_unwind<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) -> bool {
11831183
return false;
11841184
}
11851185

1186-
// Unwinds can only start at certain terminators.
1186+
// If we don't find an unwinding terminator, the function cannot unwind.
11871187
body.basic_blocks.iter().any(|block| block.terminator().unwind().is_some())
1188-
// If we didn't find an unwinding terminator, the function cannot unwind.
11891188
}
11901189

11911190
// Poison the coroutine when it unwinds

0 commit comments

Comments
 (0)