Use LocalDefId for closures more

This commit is contained in:
Cameron Steffen 2022-07-12 09:10:22 -05:00
parent 1202bbaf48
commit cf2433a74f
29 changed files with 164 additions and 171 deletions

View file

@ -191,6 +191,16 @@ impl Key for (LocalDefId, DefId) {
}
}
impl Key for (LocalDefId, LocalDefId) {
#[inline(always)]
fn query_crate_is_local(&self) -> bool {
true
}
fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
self.0.default_span(tcx)
}
}
impl Key for (DefId, Option<Ident>) {
#[inline(always)]
fn query_crate_is_local(&self) -> bool {