Use assert_matches around the compiler

This commit is contained in:
Michael Goulet
2024-08-11 12:10:36 -04:00
parent 68d2e8a66e
commit c361c924a0
39 changed files with 100 additions and 49 deletions

View File

@@ -1,3 +1,4 @@
use std::assert_matches::assert_matches;
use std::fmt::Debug;
use std::marker::PhantomData;
@@ -63,7 +64,7 @@ where
E: FromSolverError<'tcx, NextSolverError<'tcx>>,
{
fn normalize_alias_ty(&mut self, alias_ty: Ty<'tcx>) -> Result<Ty<'tcx>, Vec<E>> {
assert!(matches!(alias_ty.kind(), ty::Alias(..)));
assert_matches!(alias_ty.kind(), ty::Alias(..));
let infcx = self.at.infcx;
let tcx = infcx.tcx;