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::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))
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,6 @@ pub enum Def {
|
||||
/// - If it's an ExprPath referring to some tuple struct, then DefMap maps
|
||||
/// it to a def whose id is the StructDef.ctor_id.
|
||||
DefStruct(DefId),
|
||||
DefRegion(ast::NodeId),
|
||||
DefLabel(ast::NodeId),
|
||||
DefMethod(DefId),
|
||||
}
|
||||
@ -125,7 +124,7 @@ impl Def {
|
||||
DefVariant(..) | DefTy(..) | DefAssociatedTy(..) |
|
||||
DefTyParam(..) | DefUse(..) | DefStruct(..) | DefTrait(..) |
|
||||
DefMethod(..) | DefConst(..) | DefAssociatedConst(..) |
|
||||
DefPrimTy(..) | DefRegion(..) | DefLabel(..) | DefSelfTy(..) => {
|
||||
DefPrimTy(..) | DefLabel(..) | DefSelfTy(..) => {
|
||||
panic!("attempted .def_id() on invalid {:?}", self)
|
||||
}
|
||||
}
|
||||
@ -143,7 +142,6 @@ impl Def {
|
||||
|
||||
DefLocal(id) |
|
||||
DefUpvar(id, _, _) |
|
||||
DefRegion(id) |
|
||||
DefLabel(id) |
|
||||
DefSelfTy(_, Some((_, id))) => {
|
||||
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::DefTrait(_) | def::DefTy(..) | def::DefPrimTy(_) |
|
||||
def::DefTyParam(..) | def::DefRegion(_) |
|
||||
def::DefTyParam(..) |
|
||||
def::DefLabel(_) | def::DefSelfTy(..) |
|
||||
def::DefAssociatedTy(..) => {
|
||||
Ok(Rc::new(cmt_ {
|
||||
|
@ -816,7 +816,7 @@ impl<'a, 'b:'a, 'tcx:'b> GraphBuilder<'a, 'b, 'tcx> {
|
||||
self.structs.insert(def_id, fields);
|
||||
}
|
||||
DefLocal(..) | DefPrimTy(..) | DefTyParam(..) |
|
||||
DefUse(..) | DefUpvar(..) | DefRegion(..) |
|
||||
DefUse(..) | DefUpvar(..) |
|
||||
DefLabel(..) | DefSelfTy(..) => {
|
||||
panic!("didn't expect `{:?}`", def);
|
||||
}
|
||||
|
@ -264,7 +264,6 @@ impl <'l, 'tcx> DumpCsvVisitor<'l, 'tcx> {
|
||||
def::DefFn(..) => Some(recorder::FnRef),
|
||||
|
||||
def::DefSelfTy(..) |
|
||||
def::DefRegion(_) |
|
||||
def::DefLabel(_) |
|
||||
def::DefTyParam(..) |
|
||||
def::DefUse(_) |
|
||||
|
@ -215,8 +215,8 @@ fn trans<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, expr: &hir::Expr)
|
||||
}
|
||||
def::DefMod(..) | def::DefForeignMod(..) | def::DefTrait(..) |
|
||||
def::DefTy(..) | def::DefPrimTy(..) | def::DefAssociatedTy(..) |
|
||||
def::DefUse(..) | def::DefRegion(..) | def::DefLabel(..) |
|
||||
def::DefTyParam(..) | def::DefSelfTy(..) => {
|
||||
def::DefUse(..) | def::DefLabel(..) | def::DefTyParam(..) |
|
||||
def::DefSelfTy(..) => {
|
||||
bcx.tcx().sess.span_bug(
|
||||
ref_expr.span,
|
||||
&format!("cannot translate def {:?} \
|
||||
|
@ -4318,7 +4318,6 @@ fn type_scheme_and_predicates_for_def<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
|
||||
def::DefMod(..) |
|
||||
def::DefForeignMod(..) |
|
||||
def::DefUse(..) |
|
||||
def::DefRegion(..) |
|
||||
def::DefLabel(..) |
|
||||
def::DefSelfTy(..) => {
|
||||
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::DefLocal(..) |
|
||||
def::DefUse(..) |
|
||||
def::DefRegion(..) |
|
||||
def::DefLabel(..) |
|
||||
def::DefUpvar(..) => {
|
||||
segment_spaces = vec![None; segments.len()];
|
||||
|
Loading…
Reference in New Issue
Block a user