8000 [WIP] traits/select: use global vs per-infcx caches more uniformly. by eddyb · Pull Request #69294 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

[WIP] traits/select: use global vs per-infcx caches more uniformly. #69294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
traits/select: simplify "has inference vars" check.
  • Loading branch information
eddyb committed Feb 24, 2020
commit b71da57ee509d63fb3e9ad64b2b5030cbbc02b8c
4 changes: 1 addition & 3 deletions src/librustc_infer/traits/select.rs
8000
Original file line number Diff line number Diff line change
Expand Up @@ -1285,9 +1285,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
result: &SelectionResult<'tcx, SelectionCandidate<'tcx>>,
) -> bool {
match result {
Ok(Some(SelectionCandidate::ParamCandidate(trait_ref))) => {
!trait_ref.skip_binder().input_types().any(|t| t.walk().any(|t_| t_.is_ty_infer()))
}
Ok(Some(SelectionCandidate::ParamCandidate(trait_ref))) => !trait_ref.needs_infer(),
Comment on lines -1288 to +1280
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fix for #55258 (comment), I should make a separate commit but I didn't want to lose track of this.

_ => true,
}
}
Expand Down
0