File tree Expand file tree Collapse file tree 1 file changed +1
-32
lines changed
compiler/rustc_hir_analysis/src/astconv Expand file tree Collapse file tree 1 file changed +1
-32
lines changed Original file line number Diff line number Diff line change @@ -1046,38 +1046,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
10461046 } ;
10471047 debug ! ( ?bound) ;
10481048
1049- // look for a candidate that is not the same as our first bound, disregarding
1050- // whether the bound is const.
1051- let mut next_cand = matching_candidates. next ( ) ;
1052- while let Some ( mut bound2) = next_cand {
1053- debug ! ( ?bound2) ;
1054- if bound2. bound_vars ( ) != bound. bound_vars ( ) {
1055- break ;
1056- }
1057-
1058- let generics = tcx. generics_of ( bound. def_id ( ) ) ;
1059- let Some ( host_index) = generics. host_effect_index else { break } ;
1060-
1061- // always return the bound that contains the host param.
1062- if let ty:: ConstKind :: Param ( _) = bound2. skip_binder ( ) . args . const_at ( host_index) . kind ( ) {
1063- ( bound, bound2) = ( bound2, bound) ;
1064- }
1065-
1066- let unconsted_args = bound
1067- . skip_binder ( )
1068- . args
1069- . iter ( )
1070- . enumerate ( )
1071- . map ( |( n, arg) | if host_index == n { tcx. consts . true_ . into ( ) } else { arg } ) ;
1072-
1073- if unconsted_args. eq ( bound2. skip_binder ( ) . args . iter ( ) ) {
1074- next_cand = matching_candidates. next ( ) ;
1075- } else {
1076- break ;
1077- }
1078- }
1079-
1080- if let Some ( bound2) = next_cand {
1049+ if let Some ( bound2) = matching_candidates. next ( ) {
10811050 debug ! ( ?bound2) ;
10821051
10831052 let assoc_kind_str = assoc_kind_str ( assoc_kind) ;
You can’t perform that action at this time.
0 commit comments