File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
compiler/rustc_next_trait_solver/src Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 44//! but were uplifted in the process of making the new trait solver generic.
55//! So if you got to this crate from the old solver, it's totally normal.
66
7- #![ feature( if_let_guard) ]
87// tidy-alphabetical-start
98#![ allow( rustc:: direct_use_of_rustc_type_ir) ]
109#![ allow( rustc:: usage_of_type_ir_inherent) ]
Original file line number Diff line number Diff line change @@ -809,15 +809,18 @@ where
809809 #[ instrument( level = "trace" , skip( self ) , ret) ]
810810 pub ( super ) fn term_is_fully_unconstrained ( & self , goal : Goal < I , ty:: NormalizesTo < I > > ) -> bool {
811811 let universe_of_term = match goal. predicate . term . kind ( ) {
812- ty:: TermKind :: Ty ( ty) if let ty:: Infer ( ty:: TyVar ( vid) ) = ty. kind ( ) => {
812+ ty:: TermKind :: Ty ( ty) => {
813+ let ty:: Infer ( ty:: TyVar ( vid) ) = ty. kind ( ) else {
814+ return false ;
815+ } ;
813816 self . delegate . universe_of_ty ( vid) . unwrap ( )
814817 }
815- ty:: TermKind :: Const ( ct)
816- if let ty:: ConstKind :: Infer ( ty:: InferConst :: Var ( vid) ) = ct. kind ( ) =>
817- {
818+ ty:: TermKind :: Const ( ct) => {
819+ let ty:: ConstKind :: Infer ( ty:: InferConst :: Var ( vid) ) = ct. kind ( ) else {
820+ return false ;
821+ } ;
818822 self . delegate . universe_of_ct ( vid) . unwrap ( )
819823 }
820- _ => return false ,
821824 } ;
822825
823826 struct ContainsTermOrNotNameable < ' a , D : SolverDelegate < Interner = I > , I : Interner > {
You can’t perform that action at this time.
0 commit comments