about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTaylor Cramer <cramertaylorj@gmail.com>2017-03-21 02:20:50 -0700
committerBen Striegel <ben.striegel@gmail.com>2017-03-21 16:29:38 -0400
commit873248d87d1b376c0411d474c665cc6eeefbb16c (patch)
tree7f562bebc6e237f740fc8065cdd361bb0aa85a00 /src
parenta212002db1d9c7ea4d0c21058a96631a52ba7b81 (diff)
Remove unused adt_def access by constructor in typeck/collect
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/collect.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs
index 24177455719..1ed42b842c6 100644
--- a/src/librustc_typeck/collect.rs
+++ b/src/librustc_typeck/collect.rs
@@ -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!()
     };