Rollup merge of #99027 - tmiasko:basic-blocks, r=oli-obk
Replace `Body::basic_blocks()` with field access Since the refactoring in #98930, it is possible to borrow the basic blocks independently from other parts of MIR by accessing the `basic_blocks` field directly. Replace unnecessary `Body::basic_blocks()` method with a direct field access, which has an additional benefit of borrowing the basic blocks only.
This commit is contained in:
@@ -135,7 +135,7 @@ impl<'mir, 'tcx> Qualifs<'mir, 'tcx> {
|
||||
// qualifs for the return type.
|
||||
let return_block = ccx
|
||||
.body
|
||||
.basic_blocks()
|
||||
.basic_blocks
|
||||
.iter_enumerated()
|
||||
.find(|(_, block)| matches!(block.terminator().kind, TerminatorKind::Return))
|
||||
.map(|(bb, _)| bb);
|
||||
|
||||
Reference in New Issue
Block a user