1
Fork 0

Use deterministic keyword renaming (append _)

This commit is contained in:
Oliver Schneider 2017-03-14 09:23:15 +01:00
parent 4cb1f639b7
commit 64d196a9dc
2 changed files with 4 additions and 4 deletions

View file

@ -137,9 +137,9 @@ impl<'a, 'tcx> EvalContext<'a, 'tcx> {
Local(mir::RETURN_POINTER) => self.frame().return_lvalue, Local(mir::RETURN_POINTER) => self.frame().return_lvalue,
Local(local) => Lvalue::Local { frame: self.stack.len() - 1, local, field: None }, Local(local) => Lvalue::Local { frame: self.stack.len() - 1, local, field: None },
Static(ref statik) => { Static(ref static_) => {
let substs = self.tcx.intern_substs(&[]); let substs = self.tcx.intern_substs(&[]);
Lvalue::Global(GlobalId { def_id: statik.def_id, substs, promoted: None }) Lvalue::Global(GlobalId { def_id: static_.def_id, substs, promoted: None })
} }
Projection(ref proj) => return self.eval_lvalue_projection(proj), Projection(ref proj) => return self.eval_lvalue_projection(proj),

View file

@ -242,8 +242,8 @@ impl<'a, 'b, 'tcx> Visitor<'tcx> for ConstantExtractor<'a, 'b, 'tcx> {
location: mir::Location location: mir::Location
) { ) {
self.super_lvalue(lvalue, context, location); self.super_lvalue(lvalue, context, location);
if let mir::Lvalue::Static(ref statik) = *lvalue { if let mir::Lvalue::Static(ref static_) = *lvalue {
let def_id = statik.def_id; let def_id = static_.def_id;
let substs = self.ecx.tcx.intern_substs(&[]); let substs = self.ecx.tcx.intern_substs(&[]);
let span = self.span; let span = self.span;
if let Some(node_item) = self.ecx.tcx.hir.get_if_local(def_id) { if let Some(node_item) = self.ecx.tcx.hir.get_if_local(def_id) {