adding Visitor changes
This commit is contained in:
parent
7d590b533e
commit
308e30eb7a
1 changed files with 23 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ use rustc::hir::map::definitions::DefPathData;
|
|||
use rustc::infer::InferCtxt;
|
||||
use rustc::ty::{self, ParamEnv, TyCtxt};
|
||||
use rustc::ty::maps::Providers;
|
||||
use rustc::mir::{AssertMessage, BasicBlock, BorrowKind, Location, Place};
|
||||
use rustc::mir::{AssertMessage, BasicBlock, BorrowKind, Local, Location, Place, Visitor};
|
||||
use rustc::mir::{Mir, Mutability, Operand, Projection, ProjectionElem, Rvalue};
|
||||
use rustc::mir::{Field, Statement, StatementKind, Terminator, TerminatorKind};
|
||||
use rustc::mir::ClosureRegionRequirements;
|
||||
|
|
@ -56,6 +56,20 @@ mod prefixes;
|
|||
|
||||
use std::borrow::Cow;
|
||||
|
||||
struct FindLocalAssignmentVisitor {
|
||||
from: Local,
|
||||
loc: Vec<Location>,
|
||||
}
|
||||
|
||||
impl<'tcx> Visitor<'tcx> for FindLocalAssignmentVisitor {
|
||||
fn visit_local(&mut self,
|
||||
local: &mut Local,
|
||||
_: PlaceContext<'tcx>,
|
||||
_: Location) {
|
||||
Visitor::visit_local(local,)
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) mod nll;
|
||||
|
||||
pub fn provide(providers: &mut Providers) {
|
||||
|
|
@ -2271,3 +2285,11 @@ impl ContextKind {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Mir {
|
||||
fn find_assignments(&self, local: Local) -> Vec<Location>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue