Use assert_matches around the compiler
This commit is contained in:
parent
68d2e8a66e
commit
c361c924a0
39 changed files with 100 additions and 49 deletions
|
@ -1,3 +1,5 @@
|
|||
use std::assert_matches::assert_matches;
|
||||
|
||||
use rustc_middle::ty::{self, OutlivesPredicate, Ty, TyCtxt};
|
||||
use rustc_type_ir::outlives::{compute_alias_components_recursive, Component};
|
||||
use smallvec::smallvec;
|
||||
|
@ -181,7 +183,7 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
|
|||
&self,
|
||||
generic_ty: Ty<'tcx>,
|
||||
) -> Vec<ty::PolyTypeOutlivesPredicate<'tcx>> {
|
||||
assert!(matches!(generic_ty.kind(), ty::Param(_) | ty::Placeholder(_)));
|
||||
assert_matches!(generic_ty.kind(), ty::Param(_) | ty::Placeholder(_));
|
||||
self.declared_generic_bounds_from_env_for_erased_ty(generic_ty)
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#![allow(rustc::untranslatable_diagnostic)]
|
||||
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
|
||||
#![doc(rust_logo)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(box_patterns)]
|
||||
#![feature(control_flow_enum)]
|
||||
#![feature(extend_one)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue