1
Fork 0

use is_none_or in some places in the compiler

This commit is contained in:
Ralf Jung 2024-06-12 15:22:23 +02:00
parent 63bdcaa2d9
commit 4c208ac233
13 changed files with 15 additions and 11 deletions

View file

@ -1057,7 +1057,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
ty::Str | ty::Slice(_) | ty::Dynamic(_, _, ty::Dyn) | ty::Foreign(..) => false,
ty::Tuple(tys) => tys.last().iter().all(|ty| is_very_trivially_sized(**ty)),
ty::Tuple(tys) => tys.last().is_none_or(|ty| is_very_trivially_sized(*ty)),
ty::Pat(ty, ..) => is_very_trivially_sized(*ty),