Skip to content

Commit 47fe696

Browse files
committed
use non_erasable_generics
1 parent 21078c1 commit 47fe696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/ty/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl<'tcx> TyS<'tcx> {
5454
/// ADTs with no type arguments.
5555
pub fn is_simple_text(&self) -> bool {
5656
match self.kind() {
57-
Adt(_, substs) => substs.types().next().is_none() && substs.consts().next().is_none(),
57+
Adt(_, substs) => substs.non_erasable_generics().next().is_none(),
5858
Ref(_, ty, _) => ty.is_simple_text(),
5959
_ => self.is_simple_ty(),
6060
}

0 commit comments

Comments
 (0)