]> git.lizzy.rs Git - rust.git/commitdiff
Remove unused adt_def access by constructor in typeck/collect
authorTaylor Cramer <cramertaylorj@gmail.com>
Tue, 21 Mar 2017 09:20:50 +0000 (02:20 -0700)
committerBen Striegel <ben.striegel@gmail.com>
Tue, 21 Mar 2017 20:29:38 +0000 (16:29 -0400)
src/librustc_typeck/collect.rs

index 2417745571910b3c848b213ff12d57f696b358d4..1ed42b842c6fafa3911ba8121a2a445259a3bdff 100644 (file)
@@ -689,12 +689,6 @@ fn adt_def<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
     let node_id = tcx.hir.as_local_node_id(def_id).unwrap();
     let item = match tcx.hir.get(node_id) {
         NodeItem(item) => item,
-
-        // Make adt definition available through constructor id as well.
-        NodeStructCtor(_) => {
-            return tcx.lookup_adt_def(tcx.hir.get_parent_did(node_id));
-        }
-
         _ => bug!()
     };