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

Correctly change type when adding adjustments on top of NeverToAny #123571

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

WaffleLapkin
Copy link
Member

I'm concerned that the check only caught the problem with fallback = !, because at least MIR contained <() as PartialEq>::eq(move _5, move _7) where _5: ().

I rediscovered the issue when looking at #123482's crater run.

r? compiler-errors
Fixes #120600

@WaffleLapkin WaffleLapkin changed the title Correctly change type when adding adjustments on top of NeverToAny Correctly change type when adding adjustments on top of NeverToAny Apr 6, 2024
@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 Apr 6, 2024
@@ -0,0 +1,12 @@
// skip-filecheck
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to use // CHECK, but could make it work, because they seem to be run on the optimized MIR, at which point everything is dead-code-eliminated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add a -Zmir-opt-level=0, which will avoid opts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call is deleted even with -Zmir-opt-level=0 :(

@rust-log-analyzer

This comment has been minimized.

@@ -0,0 +1,13 @@
//@ check-pass
//
// Regression test for <https://github.com/rust-lang/rust/issues/120600>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be
// issue: rust-lang/rust#120600

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this this standardized anywhere? (this is not a normal test annotation, judging by no @...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the tests currently use this formatting actually....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this this standardized anywhere? (this is not a normal test annotation, judging by no @...)

(we don't have any standardized issue annotations yet AFAICT)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None

🤔
git grep "// issue" | wc -l : 309

git grep "// issue.*rust-lang/rust" | wc -l : 41

afaik Jubilee planned to add a tidy lint at some point™

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M. something went wrong with my search... (possibly me)

There are a lot of different styles, but sure. Changed it.

@rust-cloud-vms rust-cloud-vms bot force-pushed the properly-adjust-never branch 2 times, most recently from 86ea8a9 to 62d956f Compare April 6, 2024 21:56
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @WaffleLapkin, sorry for taking so long to review :>

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 18, 2024

📌 Commit 62d956f 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 Apr 18, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 18, 2024
…, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 18, 2024
…, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Apr 18, 2024
…, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 18, 2024
…kingjubilee

Rollup of 6 pull requests

Successful merges:

 - rust-lang#117919 (Introduce perma-unstable `wasm-c-abi` flag)
 - rust-lang#123571 (Correctly change type when adding adjustments on top of `NeverToAny`)
 - rust-lang#123752 (Properly handle emojis as literal prefix in macros)
 - rust-lang#123980 ( Add an opt-in to store incoming edges in `VecGraph` + misc)
 - rust-lang#124110 (Fix negating `f16` and `f128` constants)
 - rust-lang#124116 (when suggesting RUST_BACKTRACE=1, add a special note for Miri's env var isolation)

r? `@ghost`
`@rustbot` modify labels: rollup
@beetrees
Copy link
Contributor

I think an ICE test that was added for #120600 in #122997 4 days ago is causing this PR to fail CI. Specifically tests/crashes/120600.rs and tests/crashes/120600-2.rs.

@compiler-errors
Copy link
Member

Those tests just need to be deleted then. r=me after fixing the tests.

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 19, 2024
@rust-cloud-vms rust-cloud-vms bot force-pushed the properly-adjust-never branch from 62d956f to e5a6d8d Compare April 19, 2024 11:35
@WaffleLapkin
Copy link
Member Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Apr 19, 2024

📌 Commit e5a6d8d 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 19, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 19, 2024
…, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 19, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#123571 (Correctly change type when adding adjustments on top of `NeverToAny`)
 - rust-lang#123729 (run-make: refactor out command wrappers for `clang` and `llvm-readobj`)
 - rust-lang#124149 (rustdoc-search: fix description on aliases in results)
 - rust-lang#124155 (bootstrap: don't use rayon for sysinfo)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 19, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#123571 (Correctly change type when adding adjustments on top of `NeverToAny`)
 - rust-lang#123729 (run-make: refactor out command wrappers for `clang` and `llvm-readobj`)
 - rust-lang#124106 (Don't repeatedly duplicate TAIT lifetimes for each subsequently nested TAIT)
 - rust-lang#124149 (rustdoc-search: fix description on aliases in results)
 - rust-lang#124155 (bootstrap: don't use rayon for sysinfo)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6c4657c into rust-lang:master Apr 19, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 19, 2024
Rollup merge of rust-lang#123571 - WaffleLapkin:properly-adjust-never, r=compiler-errors

Correctly change type when adding adjustments on top of `NeverToAny`

I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`.

I rediscovered the issue when looking at rust-lang#123482's crater run.

r? compiler-errors
Fixes rust-lang#120600
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.

ICE involving match and never type with never type as fallback enabled
9 participants