From: Taylor Cramer Date: Tue, 21 Mar 2017 09:20:50 +0000 (-0700) Subject: Remove unused adt_def access by constructor in typeck/collect X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=873248d87d1b376c0411d474c665cc6eeefbb16c;p=rust.git Remove unused adt_def access by constructor in typeck/collect --- 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!() };