@@ -1087,26 +1087,25 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
10871087 let tcx = self . tcx ( ) ;
10881088 // Respect const trait obligations
10891089 if self . is_trait_predicate_const ( obligation. predicate . skip_binder ( ) ) {
1090- match candidate {
1091- // const impl
1092- ImplCandidate ( def_id)
1093- if tcx. impl_constness ( def_id) == hir:: Constness :: Const => { }
1094- // const param
1095- ParamCandidate ( ty:: ConstnessAnd {
1096- constness : ty:: BoundConstness :: ConstIfConst ,
1097- ..
1098- } ) => { }
1099- // auto trait impl
1100- AutoImplCandidate ( ..) => { }
1101- // generator, this will raise error in other places
1102- // or ignore error with const_async_blocks feature
1103- GeneratorCandidate => { }
1104- ConstDropCandidate => { }
1105- _ => {
1106- // reject all other types of candidates
1107- return Err ( Unimplemented ) ;
1108- }
1090+ match candidate {
1091+ // const impl
1092+ ImplCandidate ( def_id) if tcx. impl_constness ( def_id) == hir:: Constness :: Const => { }
1093+ // const param
1094+ ParamCandidate ( ty:: ConstnessAnd {
1095+ constness : ty:: BoundConstness :: ConstIfConst ,
1096+ ..
1097+ } ) => { }
1098+ // auto trait impl
1099+ AutoImplCandidate ( ..) => { }
1100+ // generator, this will raise error in other places
1101+ // or ignore error with const_async_blocks feature
1102+ GeneratorCandidate => { }
1103+ ConstDropCandidate => { }
1104+ _ => {
1105+ // reject all other types of candidates
1106+ return Err ( Unimplemented ) ;
11091107 }
1108+ }
11101109 }
11111110 // Treat negative impls as unimplemented, and reservation impls as ambiguity.
11121111 if let ImplCandidate ( def_id) = candidate {
0 commit comments