Remove DefRegion, which is not used
This commit is contained in:
parent
1dd5ffa405
commit
cb784b70ba
@ -476,7 +476,6 @@ impl tr for def::Def {
|
|||||||
def::DefUpvar(dcx.tr_id(nid1), index, dcx.tr_id(nid2))
|
def::DefUpvar(dcx.tr_id(nid1), index, dcx.tr_id(nid2))
|
||||||
}
|
}
|
||||||
def::DefStruct(did) => def::DefStruct(did.tr(dcx)),
|
def::DefStruct(did) => def::DefStruct(did.tr(dcx)),
|
||||||
def::DefRegion(nid) => def::DefRegion(dcx.tr_id(nid)),
|
|
||||||
def::DefLabel(nid) => def::DefLabel(dcx.tr_id(nid))
|
def::DefLabel(nid) => def::DefLabel(dcx.tr_id(nid))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@ pub enum Def {
|
|||||||
/// - If it's an ExprPath referring to some tuple struct, then DefMap maps
|
/// - If it's an ExprPath referring to some tuple struct, then DefMap maps
|
||||||
/// it to a def whose id is the StructDef.ctor_id.
|
/// it to a def whose id is the StructDef.ctor_id.
|
||||||
DefStruct(DefId),
|
DefStruct(DefId),
|
||||||
DefRegion(ast::NodeId),
|
|
||||||
DefLabel(ast::NodeId),
|
DefLabel(ast::NodeId),
|
||||||
DefMethod(DefId),
|
DefMethod(DefId),
|
||||||
}
|
}
|
||||||
@ -125,7 +124,7 @@ impl Def {
|
|||||||
DefVariant(..) | DefTy(..) | DefAssociatedTy(..) |
|
DefVariant(..) | DefTy(..) | DefAssociatedTy(..) |
|
||||||
DefTyParam(..) | DefUse(..) | DefStruct(..) | DefTrait(..) |
|
DefTyParam(..) | DefUse(..) | DefStruct(..) | DefTrait(..) |
|
||||||
DefMethod(..) | DefConst(..) | DefAssociatedConst(..) |
|
DefMethod(..) | DefConst(..) | DefAssociatedConst(..) |
|
||||||
DefPrimTy(..) | DefRegion(..) | DefLabel(..) | DefSelfTy(..) => {
|
DefPrimTy(..) | DefLabel(..) | DefSelfTy(..) => {
|
||||||
panic!("attempted .def_id() on invalid {:?}", self)
|
panic!("attempted .def_id() on invalid {:?}", self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -143,7 +142,6 @@ impl Def {
|
|||||||
|
|
||||||
DefLocal(id) |
|
DefLocal(id) |
|
||||||
DefUpvar(id, _, _) |
|
DefUpvar(id, _, _) |
|
||||||
DefRegion(id) |
|
|
||||||
DefLabel(id) |
|
DefLabel(id) |
|
||||||
DefSelfTy(_, Some((_, id))) => {
|
DefSelfTy(_, Some((_, id))) => {
|
||||||
DefId::xxx_local(id) // TODO, clearly
|
DefId::xxx_local(id) // TODO, clearly
|
||||||
|
@ -551,7 +551,7 @@ impl<'t, 'a,'tcx> MemCategorizationContext<'t, 'a, 'tcx> {
|
|||||||
}
|
}
|
||||||
def::DefMod(_) | def::DefForeignMod(_) | def::DefUse(_) |
|
def::DefMod(_) | def::DefForeignMod(_) | def::DefUse(_) |
|
||||||
def::DefTrait(_) | def::DefTy(..) | def::DefPrimTy(_) |
|
def::DefTrait(_) | def::DefTy(..) | def::DefPrimTy(_) |
|
||||||
def::DefTyParam(..) | def::DefRegion(_) |
|
def::DefTyParam(..) |
|
||||||
def::DefLabel(_) | def::DefSelfTy(..) |
|
def::DefLabel(_) | def::DefSelfTy(..) |
|
||||||
def::DefAssociatedTy(..) => {
|
def::DefAssociatedTy(..) => {
|
||||||
Ok(Rc::new(cmt_ {
|
Ok(Rc::new(cmt_ {
|
||||||
|
@ -816,7 +816,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
|
|||||||
self.structs.insert(def_id, fields);
|
self.structs.insert(def_id, fields);
|
||||||
}
|
}
|
||||||
DefLocal(..) | DefPrimTy(..) | DefTyParam(..) |
|
DefLocal(..) | DefPrimTy(..) | DefTyParam(..) |
|
||||||
DefUse(..) | DefUpvar(..) | DefRegion(..) |
|
DefUse(..) | DefUpvar(..) |
|
||||||
DefLabel(..) | DefSelfTy(..) => {
|
DefLabel(..) | DefSelfTy(..) => {
|
||||||
panic!("didn't expect `{:?}`", def);
|
panic!("didn't expect `{:?}`", def);
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,6 @@ impl <'l, 'tcx> DumpCsvVisitor<'l, 'tcx> {
|
|||||||
def::DefFn(..) => Some(recorder::FnRef),
|
def::DefFn(..) => Some(recorder::FnRef),
|
||||||
|
|
||||||
def::DefSelfTy(..) |
|
def::DefSelfTy(..) |
|
||||||
def::DefRegion(_) |
|
|
||||||
def::DefLabel(_) |
|
def::DefLabel(_) |
|
||||||
def::DefTyParam(..) |
|
def::DefTyParam(..) |
|
||||||
def::DefUse(_) |
|
def::DefUse(_) |
|
||||||
|
@ -215,8 +215,8 @@ fn trans<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, expr: &hir::Expr)
|
|||||||
}
|
}
|
||||||
def::DefMod(..) | def::DefForeignMod(..) | def::DefTrait(..) |
|
def::DefMod(..) | def::DefForeignMod(..) | def::DefTrait(..) |
|
||||||
def::DefTy(..) | def::DefPrimTy(..) | def::DefAssociatedTy(..) |
|
def::DefTy(..) | def::DefPrimTy(..) | def::DefAssociatedTy(..) |
|
||||||
def::DefUse(..) | def::DefRegion(..) | def::DefLabel(..) |
|
def::DefUse(..) | def::DefLabel(..) | def::DefTyParam(..) |
|
||||||
def::DefTyParam(..) | def::DefSelfTy(..) => {
|
def::DefSelfTy(..) => {
|
||||||
bcx.tcx().sess.span_bug(
|
bcx.tcx().sess.span_bug(
|
||||||
ref_expr.span,
|
ref_expr.span,
|
||||||
&format!("cannot translate def {:?} \
|
&format!("cannot translate def {:?} \
|
||||||
|
@ -4318,7 +4318,6 @@ fn type_scheme_and_predicates_for_def<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
|
|||||||
def::DefMod(..) |
|
def::DefMod(..) |
|
||||||
def::DefForeignMod(..) |
|
def::DefForeignMod(..) |
|
||||||
def::DefUse(..) |
|
def::DefUse(..) |
|
||||||
def::DefRegion(..) |
|
|
||||||
def::DefLabel(..) |
|
def::DefLabel(..) |
|
||||||
def::DefSelfTy(..) => {
|
def::DefSelfTy(..) => {
|
||||||
fcx.ccx.tcx.sess.span_bug(sp, &format!("expected value, found {:?}", defn));
|
fcx.ccx.tcx.sess.span_bug(sp, &format!("expected value, found {:?}", defn));
|
||||||
@ -4489,7 +4488,6 @@ pub fn instantiate_path<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
|
|||||||
def::DefForeignMod(..) |
|
def::DefForeignMod(..) |
|
||||||
def::DefLocal(..) |
|
def::DefLocal(..) |
|
||||||
def::DefUse(..) |
|
def::DefUse(..) |
|
||||||
def::DefRegion(..) |
|
|
||||||
def::DefLabel(..) |
|
def::DefLabel(..) |
|
||||||
def::DefUpvar(..) => {
|
def::DefUpvar(..) => {
|
||||||
segment_spaces = vec![None; segments.len()];
|
segment_spaces = vec![None; segments.len()];
|
||||||
|
Loading…
Reference in New Issue
Block a user