Skip to content
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

Use is_global in candidate_should_be_dropped_in_favor_of #90375

Merged
merged 3 commits into from
Oct 30, 2021

Commits on Oct 28, 2021

  1. Use is_global in candidate_should_be_dropped_in_favor_of

    This manifistated in rust-lang#90195 with compiler being unable to keep
    one candidate for a trait impl, if where is a global impl and more
    than one trait bound in the where clause.
    
    Before rust-lang#87280 `candidate_should_be_dropped_in_favor_of` was using
    `TypeFoldable::is_global()` that was enough to discard the two
    `ParamCandidate`s. But rust-lang#87280 changed it to use
    `TypeFoldable::is_known_global()` instead, which is pessimistic, so
    now the compiler drops the global impl instead (because
    `is_known_global` is not sure) and then can't decide between the
    two `ParamCandidate`s.
    
    Switching it to use `is_global` again solves the issue.
    
    Fixes rust-lang#90195.
    yanok committed Oct 28, 2021
    Configuration menu
    Copy the full SHA
    6c61db4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6f942a2 View commit details
    Browse the repository at this point in the history
  3. Add test cases

    yanok committed Oct 28, 2021
    Configuration menu
    Copy the full SHA
    9a0a622 View commit details
    Browse the repository at this point in the history