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

Try normalizing types without RevealAll in ParamEnv in MIR validation #100121

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

Nilstrieb
Copy link
Member

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes #99866

cc @compiler-errors who nicely helped me on zulip

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Aug 3, 2022
@rust-highfive
Copy link
Collaborator

r? @oli-obk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 3, 2022
@oli-obk
Copy link
Contributor

oli-obk commented Aug 24, 2022

r=me with style nit

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.
Before, it called `normalize_erasing_regions` twice since
`equal_up_to_regions` called it as well for both types.
@Nilstrieb
Copy link
Member Author

@oli-obk I fixed it (hopefully CI passes)

@oli-obk
Copy link
Contributor

oli-obk commented Aug 30, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Aug 30, 2022

📌 Commit 96d4137 has been approved by oli-obk

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 Aug 30, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 1, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc `@compiler-errors` who nicely helped me on zulip
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 1, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc ``@compiler-errors`` who nicely helped me on zulip
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 1, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc ```@compiler-errors``` who nicely helped me on zulip
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 1, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc ````@compiler-errors```` who nicely helped me on zulip
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 1, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc `````@compiler-errors````` who nicely helped me on zulip
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 2, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc `@compiler-errors` who nicely helped me on zulip
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 2, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc ``@compiler-errors`` who nicely helped me on zulip
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 2, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc ```@compiler-errors``` who nicely helped me on zulip
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 2, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc ````@compiler-errors```` who nicely helped me on zulip
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 2, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc `````@compiler-errors````` who nicely helped me on zulip
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 2, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc ``````@compiler-errors`````` who nicely helped me on zulip
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 2, 2022
… r=oli-obk

Try normalizing types without RevealAll in ParamEnv in MIR validation

Before, the MIR validator used RevealAll in its ParamEnv for type
checking. This could cause false negatives in some cases due to
RevealAll ParamEnvs not always use all predicates as expected here.

Since some MIR passes like inlining use RevealAll as well, keep using
it in the MIR validator too, but when it fails usign RevealAll, also
try the check without it, to stop false negatives.

Fixes rust-lang#99866

cc ```````@compiler-errors``````` who nicely helped me on zulip
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 2, 2022
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#100121 (Try normalizing types without RevealAll in ParamEnv in MIR validation)
 - rust-lang#100200 (Change implementation of `-Z gcc-ld` and `lld-wrapper` again)
 - rust-lang#100814 ( Porting 'compiler/rustc_trait_selection' to translatable diagnostics - Part 1)
 - rust-lang#101215 (Also replace the version placeholder in rustc_attr)
 - rust-lang#101260 (Use `FILE_ATTRIBUTE_TAG_INFO` to get reparse tag)
 - rust-lang#101323 (Remove unused .toggle-label CSS rule)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 938897e into rust-lang:master Sep 2, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 2, 2022
@RalfJung
Copy link
Member

RalfJung commented Sep 2, 2022

Is it possible that this caused #101344 ?

@tmandry
Copy link
Member

tmandry commented Sep 2, 2022

We're seeing a related-looking ICE on Fuchsia that I think is likely caused by this PR (none of the other changes in #101333 seem to be likely candidates). #101344 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

broken MIR in Item (nightly)
8 participants