Skip to content

Incompleteness in preferring subst-relate candidate in alias-relate goals #26

Closed
@compiler-errors

Description

@compiler-errors

There are 3 ways to prove AliasRelate goals: lhs normalize-to rhs, rhs normalize-to lhs, and substs-relate.

If merging the three options via fn try_merge_responses fails, we incompletely prefer substs-relate over normalizing. https://github.com/rust-lang/rust/blob/a482149598f5aacf3837eee87026dd634f08641c/compiler/rustc_trait_selection/src/solve/alias_relate.rs#L84-L86

It seems like this incompleteness is not necessary if we go with #25 instead.


edit: original description

ill write this tomorrow since it's 21:50 rn and i want to sleep

tl;dr here's the list of failing tests before and after -- red (left-hand side) tests are those that are fixed by the incompleteness, and green (right-hand side) are those that begin to fail after the incompleteness: https://www.diffchecker.com/NdEJkqfr/

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incompleteincorrectly return `NoSolution`, unsound during coherence

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions