Skip to content

Commit

Permalink
Remove unused adt_def access by constructor in typeck/collect
Browse files Browse the repository at this point in the history
  • Loading branch information
cramertj authored and bstrie committed Mar 21, 2017
1 parent a212002 commit 873248d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/librustc_typeck/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!()
};

Expand Down

0 comments on commit 873248d

Please sign in to comment.