Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b71da57

Browse files
committedFeb 24, 2020
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

Lines changed: 1 addition & 3 deletions
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)
Please sign in to comment.