diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-08-29 06:34:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-29 06:34:43 +0200 |
| commit | d182081de1ae2fe580c038abd526d85cedafa712 (patch) | |
| tree | 0393e811cb218b1ee3d8a2a408a25d05d3ac29c9 /compiler/rustc_mir_dataflow/src/move_paths/mod.rs | |
| parent | a96b44c9e2f952282cff1b833f39d10b8cda5f66 (diff) | |
| parent | b48870b451dd9d3f3f827aa54d9becdfdd811ba3 (diff) | |
| download | rust-d182081de1ae2fe580c038abd526d85cedafa712.tar.gz rust-d182081de1ae2fe580c038abd526d85cedafa712.zip | |
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.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/move_paths/mod.rs')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/move_paths/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs index a951c5b0b1c..b36e268cf8b 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs @@ -217,7 +217,7 @@ where fn new(body: &Body<'_>) -> Self { LocationMap { map: body - .basic_blocks() + .basic_blocks .iter() .map(|block| vec![T::default(); block.statements.len() + 1]) .collect(), |
