Use LocalDecls
in a couple of places.
It's nicer than the `IndexVec` type.
This commit is contained in:
parent
7adde3f074
commit
751c8b481b
2 changed files with 2 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
|||
use rustc_index::IndexVec;
|
||||
use rustc_middle::mir::patch::MirPatch;
|
||||
use rustc_middle::mir::visit::MutVisitor;
|
||||
use rustc_middle::mir::*;
|
||||
|
@ -9,7 +8,7 @@ pub(super) struct Subtyper;
|
|||
struct SubTypeChecker<'a, 'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
patcher: MirPatch<'tcx>,
|
||||
local_decls: &'a IndexVec<Local, LocalDecl<'tcx>>,
|
||||
local_decls: &'a LocalDecls<'tcx>,
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> MutVisitor<'tcx> for SubTypeChecker<'a, 'tcx> {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use rustc_index::IndexVec;
|
||||
use rustc_middle::mir::patch::MirPatch;
|
||||
use rustc_middle::mir::visit::NonUseContext::VarDebugInfo;
|
||||
use rustc_middle::mir::visit::{MutVisitor, PlaceContext};
|
||||
|
@ -10,7 +9,7 @@ pub(super) struct Derefer;
|
|||
struct DerefChecker<'a, 'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
patcher: MirPatch<'tcx>,
|
||||
local_decls: &'a IndexVec<Local, LocalDecl<'tcx>>,
|
||||
local_decls: &'a LocalDecls<'tcx>,
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> MutVisitor<'tcx> for DerefChecker<'a, 'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue