Split super_predicates_that_define_assoc_type query from super_predicates_of
This commit is contained in:
parent
45749b21b7
commit
3dab259cb9
5 changed files with 10 additions and 12 deletions
|
@ -230,7 +230,7 @@ impl Key for (LocalDefId, LocalDefId) {
|
|||
}
|
||||
}
|
||||
|
||||
impl Key for (DefId, Option<Ident>) {
|
||||
impl Key for (DefId, Ident) {
|
||||
type CacheSelector = DefaultCacheSelector<Self>;
|
||||
|
||||
fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
|
||||
|
|
|
@ -631,10 +631,10 @@ rustc_queries! {
|
|||
/// returns the full set of predicates. If `Some<Ident>`, then the query returns only the
|
||||
/// subset of super-predicates that reference traits that define the given associated type.
|
||||
/// This is used to avoid cycles in resolving types like `T::Item`.
|
||||
query super_predicates_that_define_assoc_type(key: (DefId, Option<rustc_span::symbol::Ident>)) -> ty::GenericPredicates<'tcx> {
|
||||
desc { |tcx| "computing the super traits of `{}`{}",
|
||||
query super_predicates_that_define_assoc_type(key: (DefId, rustc_span::symbol::Ident)) -> ty::GenericPredicates<'tcx> {
|
||||
desc { |tcx| "computing the super traits of `{}` with associated type name `{}`",
|
||||
tcx.def_path_str(key.0),
|
||||
if let Some(assoc_name) = key.1 { format!(" with associated type name `{}`", assoc_name) } else { "".to_string() },
|
||||
key.1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue