use non_erasable_generics
This commit is contained in:
parent
21078c140f
commit
47fe696d8f
1 changed files with 1 additions and 1 deletions
|
@ -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(),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue