hash the contents of impl-item-ref by adding them to visitor

Also simplify some of the `ty::AssociatedItem` representation,
in particular by folding `has_value` into `hir::Defaultness`
This commit is contained in:
Niko Matsakis 2016-11-14 11:00:02 -05:00
parent c17be9ea11
commit b10b98169f
17 changed files with 234 additions and 55 deletions

View file

@ -536,7 +536,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> {
let def_id = if decl_id.is_local() {
let ti = self.tcx.associated_item(decl_id);
self.tcx.associated_items(ti.container.id())
.find(|item| item.name == ti.name && item.has_value)
.find(|item| item.name == ti.name && item.defaultness.has_value())
.map(|item| item.def_id)
} else {
None