Skip to content

Commit b71da57

Browse files
committed
traits/select: simplify "has inference vars" check.
1 parent e620d0f commit b71da57

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustc_infer/traits/select.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1285,9 +1285,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
12851285
result: &SelectionResult<'tcx, SelectionCandidate<'tcx>>,
12861286
) -> bool {
12871287
match result {
1288-
Ok(Some(SelectionCandidate::ParamCandidate(trait_ref))) => {
1289-
!trait_ref.skip_binder().input_types().any(|t| t.walk().any(|t_| t_.is_ty_infer()))
1290-
}
1288+
Ok(Some(SelectionCandidate::ParamCandidate(trait_ref))) => !trait_ref.needs_infer(),
12911289
_ => true,
12921290
}
12931291
}

0 commit comments

Comments
 (0)