Use LocalDefId in ItemCtxt

This commit is contained in:
Michael Goulet
2023-03-13 19:06:41 +00:00
parent 2eb1c08e43
commit 979ef5981f
11 changed files with 110 additions and 112 deletions

View File

@@ -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 {