Replace Body::basic_blocks() with field access

This commit is contained in:
Tomasz Miąsko
2022-07-05 00:00:00 +00:00
parent 983f4daddf
commit b48870b451
65 changed files with 131 additions and 140 deletions

View File

@@ -331,11 +331,6 @@ impl<'tcx> Body<'tcx> {
body
}
#[inline]
pub fn basic_blocks(&self) -> &IndexVec<BasicBlock, BasicBlockData<'tcx>> {
&self.basic_blocks
}
#[inline]
pub fn basic_blocks_mut(&mut self) -> &mut IndexVec<BasicBlock, BasicBlockData<'tcx>> {
self.basic_blocks.as_mut()
@@ -490,7 +485,7 @@ impl<'tcx> Index<BasicBlock> for Body<'tcx> {
#[inline]
fn index(&self, index: BasicBlock) -> &BasicBlockData<'tcx> {
&self.basic_blocks()[index]
&self.basic_blocks[index]
}
}