Note that trait aliases cannot be recursive

This commit is contained in:
Noah Lev 2021-08-21 14:19:59 -07:00
parent bf360dc272
commit c861964735
3 changed files with 21 additions and 9 deletions

View file

@ -178,6 +178,10 @@ impl Key for (DefId, Option<Ident>) {
fn default_span(&self, tcx: TyCtxt<'_>) -> Span {
tcx.def_span(self.0)
}
#[inline(always)]
fn key_as_def_id(&self) -> Option<DefId> {
Some(self.0)
}
}
impl Key for (DefId, LocalDefId, Ident) {