Skip to content

Commit 7918299

Browse files
committed
fix dep-graph checking to account for implitems
1 parent eeb45c7 commit 7918299

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/librustc_incremental/assert_dep_graph.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ impl<'a, 'tcx> ItemLikeVisitor<'tcx> for IfThisChanged<'a, 'tcx> {
172172
self.process_attrs(item.id, &item.attrs);
173173
}
174174

175-
fn visit_impl_item(&mut self, _impl_item: &'tcx hir::ImplItem) {
176-
// handled in `visit_item` above
175+
fn visit_impl_item(&mut self, impl_item: &'tcx hir::ImplItem) {
176+
self.process_attrs(impl_item.id, &impl_item.attrs);
177177
}
178178
}
179179

src/test/compile-fail/dep-graph-type-alias.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ trait Trait {
4242

4343
struct SomeType;
4444

45-
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
45+
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR no path
4646
impl SomeType {
47+
#[rustc_then_this_would_need(ItemSignature)] //~ ERROR OK
4748
fn method(&self, _: TypeAlias) {}
4849
}
4950

0 commit comments

Comments
 (0)