1
Fork 0

TAIT: use hack in ->HIR to avoid more changes

This commit is contained in:
Mazdak Farrokhzad 2019-11-07 19:13:22 +01:00
parent 0e8e176b69
commit aa6a72f4a5
4 changed files with 46 additions and 31 deletions

View file

@ -1815,6 +1815,15 @@ impl TyKind {
false
}
}
/// HACK(type_alias_impl_trait, Centril): A temporary crutch used
/// in lowering to avoid making larger changes there and beyond.
pub fn opaque_top_hack(&self) -> Option<&GenericBounds> {
match self {
Self::ImplTrait(_, bounds) => Some(bounds),
_ => None,
}
}
}
/// Syntax used to declare a trait object.