-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Allow multiple candidates with same response in new solver #107863
Allow multiple candidates with same response in new solver #107863
Conversation
r? @Nilstrieb (rustbot has picked a reviewer for you, use r? to override) |
These commits modify the If this was intentional then you can ignore this comment. Some changes occurred to the core trait solver cc @rust-lang/initiative-trait-system-refactor |
r? @lcnr |
if candidates.len() > 1 { | ||
// If there are *STILL* multiple candidates that have *different* response | ||
// results, give up and report ambiguity. | ||
if candidates.len() > 1 && !candidates.iter().map(|cand| cand.result).all_equal() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could also take the intersection of the candidates' certainty... but if they're not all Certainty::Yes
then we already return ambiguous, so I think this has the same effect.
@bors r+ |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#107043 (Support `true` and `false` as boolean flag params) - rust-lang#107831 (Query refactoring) - rust-lang#107841 (Handled snap curl issue inside Rust) - rust-lang#107852 (rustdoc: remove unused fn parameter `tab`) - rust-lang#107861 (Sync release notes for 1.67.1) - rust-lang#107863 (Allow multiple candidates with same response in new solver) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
@bors rollup |
Treat >1 candidates as not ambiguous if they return the same response.