This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/tools/clippy/clippy_utils/src/ty/type_certainty Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,8 @@ fn path_segment_certainty(
207207 // Checking `res_generics_def_id(..)` before calling `generics_of` avoids an ICE.
208208 if cx. tcx . res_generics_def_id ( path_segment. res ) . is_some ( ) {
209209 let generics = cx. tcx . generics_of ( def_id) ;
210- let lhs = if ( parent_certainty. is_certain ( ) || generics. parent_count == 0 ) && generics. params . is_empty ( )
210+ let count = generics. params . len ( ) - generics. host_effect_index . is_some ( ) as usize ;
211+ let lhs = if ( parent_certainty. is_certain ( ) || generics. parent_count == 0 ) && count == 0
211212 {
212213 Certainty :: Certain ( None )
213214 } else {
@@ -299,7 +300,7 @@ fn type_is_inferrable_from_arguments(cx: &LateContext<'_>, expr: &Expr<'_>) -> b
299300
300301 // Check that all type parameters appear in the functions input types.
301302 ( 0 ..( generics. parent_count + generics. params . len ( ) ) as u32 ) . all ( |index| {
302- fn_sig
303+ Some ( index as usize ) == generics . host_effect_index || fn_sig
303304 . inputs ( )
304305 . iter ( )
305306 . any ( |input_ty| contains_param ( * input_ty. skip_binder ( ) , index) )
You can’t perform that action at this time.
0 commit comments