use non_erasable_generics

This commit is contained in:
Ellen 2021-06-08 09:07:52 +01:00
parent 21078c140f
commit 47fe696d8f

View file

@ -54,7 +54,7 @@ impl<'tcx> TyS<'tcx> {
/// ADTs with no type arguments. /// ADTs with no type arguments.
pub fn is_simple_text(&self) -> bool { pub fn is_simple_text(&self) -> bool {
match self.kind() { match self.kind() {
Adt(_, substs) => substs.types().next().is_none() && substs.consts().next().is_none(), Adt(_, substs) => substs.non_erasable_generics().next().is_none(),
Ref(_, ty, _) => ty.is_simple_text(), Ref(_, ty, _) => ty.is_simple_text(),
_ => self.is_simple_ty(), _ => self.is_simple_ty(),
} }