1
Fork 0

Fix missing note on type mismatch error diagnostics

This commit is contained in:
Ellen 2021-05-29 05:37:45 +01:00
parent f208f207d6
commit d75742b1eb
4 changed files with 15 additions and 5 deletions

View file

@ -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(),
Adt(_, substs) => substs.types().next().is_none() && substs.consts().next().is_none(),
Ref(_, ty, _) => ty.is_simple_text(),
_ => self.is_simple_ty(),
}