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

Don't normalize projections referencing type error #113472

Conversation

compiler-errors
Copy link
Member

Please see UI test for example referenced here: If we try to equate the projection goal <[type error] as Mirror>::Assoc against an impl header that looks like <Wrapper<?0> as Mirror>::Assoc, this will succeed without constraining ?0 since [type error] unifies with everything.

This means that sometimes we can get a non-ambiguous response that does not constrain a projection, which causes these assertions to trigger in some UI tests:

assert!(
!ty.has_infer() && !ty.has_placeholders() && !ty.has_free_regions(),
"{ty} can't be put into typeck results"
);

debug_assert!(!erased.has_infer(), "{erased:?}");

r? @lcnr

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jul 8, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 8, 2023

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@compiler-errors compiler-errors changed the title MAKE PR: Don't normalize projections referencing type error Don't normalize projections referencing type error Jul 8, 2023
@rust-cloud-vms rust-cloud-vms bot force-pushed the new-solver-dont-normalize-err branch from b46599a to 01eec53 Compare July 8, 2023 04:37
@compiler-errors compiler-errors deleted the new-solver-dont-normalize-err branch August 11, 2023 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants