Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions src/librustc_save_analysis/dump_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,15 +669,18 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
}
}
}
self.visit_ty(&typ);
if let &Some(ref trait_ref) = trait_ref {
self.process_path(trait_ref.ref_id, &trait_ref.path);
}
self.process_generic_params(generics, "", item.id);
for impl_item in impl_items {
let map = &self.tcx.hir();
self.process_impl_item(impl_item, map.local_def_id_from_node_id(item.id));
}

let map = &self.tcx.hir();
self.nest_tables(item.id, |v| {
v.visit_ty(&typ);
if let &Some(ref trait_ref) = trait_ref {
v.process_path(trait_ref.ref_id, &trait_ref.path);
}
v.process_generic_params(generics, "", item.id);
for impl_item in impl_items {
v.process_impl_item(impl_item, map.local_def_id_from_node_id(item.id));
}
});
}

fn process_trait(
Expand Down
15 changes: 15 additions & 0 deletions src/test/ui/save-analysis/issue-65411.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// check-pass
// compile-flags: -Zsave-analysis

trait Trait { type Assoc; }
trait GenericTrait<T> {}
struct Wrapper<B> { b: B }

fn func() {
// Processing associated path in impl block definition inside a function
// body does not ICE
impl<B: Trait> GenericTrait<B::Assoc> for Wrapper<B> {}
}


fn main() {}