Use LocalDefId in ItemCtxt
This commit is contained in:
parent
2eb1c08e43
commit
979ef5981f
11 changed files with 110 additions and 112 deletions
|
@ -316,12 +316,12 @@ impl Key for (DefId, Option<Ident>) {
|
|||
}
|
||||
}
|
||||
|
||||
impl Key for (DefId, LocalDefId, Ident) {
|
||||
impl Key for (LocalDefId, LocalDefId, Ident) {
|
||||
type CacheSelector = DefaultCacheSelector<Self>;
|
||||
type LocalKey = (LocalDefId, LocalDefId, Ident);
|
||||
type LocalKey = Self;
|
||||
|
||||
fn as_local_key(&self) -> Option<Self::LocalKey> {
|
||||
Some((self.0.as_local()?, self.1, self.2))
|
||||
Some(*self)
|
||||
}
|
||||
|
||||
fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
|
||||
|
|
|
@ -639,7 +639,7 @@ rustc_queries! {
|
|||
|
||||
/// To avoid cycles within the predicates of a single item we compute
|
||||
/// per-type-parameter predicates for resolving `T::AssocTy`.
|
||||
query type_param_predicates(key: (DefId, LocalDefId, rustc_span::symbol::Ident)) -> ty::GenericPredicates<'tcx> {
|
||||
query type_param_predicates(key: (LocalDefId, LocalDefId, rustc_span::symbol::Ident)) -> ty::GenericPredicates<'tcx> {
|
||||
desc { |tcx| "computing the bounds for type parameter `{}`", tcx.hir().ty_param_name(key.1) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue