Skip to content

Commit 6305e8a

Browse files
committed
Use LocalDecls in a couple of places.
It's nicer than the `IndexVec` type.
1 parent d93dd62 commit 6305e8a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

compiler/rustc_mir_transform/src/add_subtyping_projections.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use rustc_index::IndexVec;
21
use rustc_middle::mir::patch::MirPatch;
32
use rustc_middle::mir::visit::MutVisitor;
43
use rustc_middle::mir::*;
@@ -9,7 +8,7 @@ pub(super) struct Subtyper;
98
struct SubTypeChecker<'a, 'tcx> {
109
tcx: TyCtxt<'tcx>,
1110
patcher: MirPatch<'tcx>,
12-
local_decls: &'a IndexVec<Local, LocalDecl<'tcx>>,
11+
local_decls: &'a LocalDecls<'tcx>,
1312
}
1413

1514
impl<'a, 'tcx> MutVisitor<'tcx> for SubTypeChecker<'a, 'tcx> {

compiler/rustc_mir_transform/src/deref_separator.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use rustc_index::IndexVec;
21
use rustc_middle::mir::patch::MirPatch;
32
use rustc_middle::mir::visit::NonUseContext::VarDebugInfo;
43
use rustc_middle::mir::visit::{MutVisitor, PlaceContext};
@@ -10,7 +9,7 @@ pub(super) struct Derefer;
109
struct DerefChecker<'a, 'tcx> {
1110
tcx: TyCtxt<'tcx>,
1211
patcher: MirPatch<'tcx>,
13-
local_decls: &'a IndexVec<Local, LocalDecl<'tcx>>,
12+
local_decls: &'a LocalDecls<'tcx>,
1413
}
1514

1615
impl<'a, 'tcx> MutVisitor<'tcx> for DerefChecker<'a, 'tcx> {

0 commit comments

Comments
 (0)