use non_erasable_generics
This commit is contained in:
parent
21078c140f
commit
47fe696d8f
@ -54,7 +54,7 @@ impl<'tcx> TyS<'tcx> {
|
||||
/// ADTs with no type arguments.
|
||||
pub fn is_simple_text(&self) -> bool {
|
||||
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(),
|
||||
_ => self.is_simple_ty(),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user