fix dep-graph checking to account for implitems

This commit is contained in:
Niko Matsakis 2016-11-11 10:02:10 -05:00
parent eeb45c7591
commit 7918299bf0
2 changed files with 4 additions and 3 deletions

View file

@ -172,8 +172,8 @@ impl<'a, 'tcx> ItemLikeVisitor<'tcx> for IfThisChanged<'a, 'tcx> {
self.process_attrs(item.id, &item.attrs);
}
fn visit_impl_item(&mut self, _impl_item: &'tcx hir::ImplItem) {
// handled in `visit_item` above
fn visit_impl_item(&mut self, impl_item: &'tcx hir::ImplItem) {
self.process_attrs(impl_item.id, &impl_item.attrs);
}
}

View file

@ -42,8 +42,9 @@ trait Trait {
struct SomeType;
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
impl SomeType {
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
fn method(&self, _: TypeAlias) {}
}