Skip to content

Normalize types when applying uninhabited predicate. #113103

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

cjgillot
Copy link
Contributor

Fixes #112997

@rustbot
Copy link
Collaborator

rustbot commented Jun 27, 2023

r? @davidtwco

(rustbot has picked a reviewer for you, use r? to override)

@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. labels Jun 27, 2023
@compiler-errors compiler-errors self-assigned this Jun 27, 2023
@compiler-errors
Copy link
Member

Should be fine. It's a shame that we don't normalize as we're descending the ADT though, and have to normalize on what's essentially an failure path of this logic.

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 27, 2023

📌 Commit 6f3f878 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 27, 2023
@cjgillot
Copy link
Contributor Author

My first attempt was to normalize during substitution. This was conceptually nicer, but cumbersome because introduces a dependency on the param_env in that code path.

@compiler-errors
Copy link
Member

Yeah, I fear it might negatively affect query caching if we now have ParamEnv in the key as well.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 27, 2023
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#112207 (Add trustzone and virtualization target features for aarch32.)
 - rust-lang#112454 (Make compiletest aware of targets without dynamic linking)
 - rust-lang#112628 (Allow comparing `Box`es with different allocators)
 - rust-lang#112692 (Provide more context for `rustc +nightly -Zunstable-options` on stable)
 - rust-lang#112972 (Make `UnwindAction::Continue` explicit in MIR dump)
 - rust-lang#113020 (Add tests impl via obj unless denied)
 - rust-lang#113084 (Simplify some conditions)
 - rust-lang#113103 (Normalize types when applying uninhabited predicate.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 4b1d068 into rust-lang:master Jun 28, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 28, 2023
@cjgillot cjgillot deleted the normalize-inhabited branch June 28, 2023 09:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistency in pattern matching over the never type ! as an associated trait type
5 participants