Skip to content

Commit

Permalink
use non_erasable_generics
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxyUwU committed Jun 8, 2021
1 parent 21078c1 commit 47fe696
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
Expand Down

0 comments on commit 47fe696

Please sign in to comment.