-
Notifications
You must be signed in to change notification settings - Fork 0
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
alias-bounds for normalizable alias + deeply normalize ~> MIR typeck ICE #77
Comments
the easiest fix is to change |
:( incompleteness |
always normalize `LoweredTy` in the new solver I currently expect us to stop using alias bound candidates of normalizable aliases due to rust-lang/trait-system-refactor-initiative#77 by landing rust-lang#119744. At this point it mostly doesn't matter whether we eagerly normalize (and replace with infer vars in case of ambiguity). cc rust-lang#113473 previous attempt The infer var replacement for ambiguous projections can in very rare cases: - weaken inference rust-lang/trait-system-refactor-initiative#81 - strengthen inference rust-lang/trait-system-refactor-initiative#7 I do not expect this impact on inference to significantly affect real crates. r? `@compiler-errors`
always normalize `LoweredTy` in the new solver I currently expect us to stop using alias bound candidates of normalizable aliases due to rust-lang/trait-system-refactor-initiative#77 by landing rust-lang#119744. At this point it mostly doesn't matter whether we eagerly normalize (and replace with infer vars in case of ambiguity). cc rust-lang#113473 previous attempt The infer var replacement for ambiguous projections can in very rare cases: - weaken inference rust-lang/trait-system-refactor-initiative#81 - strengthen inference rust-lang/trait-system-refactor-initiative#7 I do not expect this impact on inference to significantly affect real crates. r? ``@compiler-errors``
Rollup merge of rust-lang#120378 - lcnr:normalize-ast, r=compiler-errors always normalize `LoweredTy` in the new solver I currently expect us to stop using alias bound candidates of normalizable aliases due to rust-lang/trait-system-refactor-initiative#77 by landing rust-lang#119744. At this point it mostly doesn't matter whether we eagerly normalize (and replace with infer vars in case of ambiguity). cc rust-lang#113473 previous attempt The infer var replacement for ambiguous projections can in very rare cases: - weaken inference rust-lang/trait-system-refactor-initiative#81 - strengthen inference rust-lang/trait-system-refactor-initiative#7 I do not expect this impact on inference to significantly affect real crates. r? ``@compiler-errors``
…-errors only assemble alias bound candidates for rigid aliases fixes rust-lang/trait-system-refactor-initiative#77 This also causes `<Wrapper<?0> as Trait>::Unwrap: Trait` to always be ambig, as we now normalize the self type before checking whether it is an inference variable. I cannot think of an approach to the underlying issues here which does not require the "may-define means must-define" restriction for opaque types. Going to go ahead with this and added this restriction to the tracking issue for the new solver to make sure we don't stabilize it without getting types + lang signoff here. r? `@compiler-errors`
https://rust.godbolt.org/z/4WojT7KTW
This currently results in an ICE:
<T as Trait>::Assoc: Clone
holds due to the alias bound candidate<T as Trait>::Assoc
withU
U: Clone
which does not hold, resulting in an ICEThe text was updated successfully, but these errors were encountered: