Add a simpler and more targetted code path for impl trait in assoc items

This commit is contained in:
Oli Scherer 2024-01-09 11:12:30 +00:00
parent 366d112fa6
commit f58af9ba28
4 changed files with 88 additions and 8 deletions

View file

@ -343,6 +343,15 @@ rustc_queries! {
}
}
query impl_trait_in_assoc_types_defined_by(
key: LocalDefId
) -> &'tcx ty::List<LocalDefId> {
desc {
|tcx| "computing the opaque types defined by `{}`",
tcx.def_path_str(key.to_def_id())
}
}
/// Returns the list of bounds that can be used for
/// `SelectionCandidate::ProjectionCandidate(_)` and
/// `ProjectionTyCandidate::TraitDef`.