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

Fix more ty::Error ICEs in MIR passes #120817

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

compiler-errors
Copy link
Member

Fixes #120791 - Add a check for ty::Error in the ByMove coroutine pass
Fixes #120816 - Add a check for ty::Error in the MIR validator

Also a drive-by fix for a FIXME I had asked oli to add

r? oli-obk

@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 Feb 9, 2024
@rustbot
Copy link
Collaborator

rustbot commented Feb 9, 2024

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

if coroutine_ty.references_error() {
return;
}
let ty::Coroutine(_, args) = *coroutine_ty.kind() else { bug!("{body:#?}") };
Copy link
Contributor

Choose a reason for hiding this comment

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

If more issues like these arise, we should probably just strip the body of tainted bodies after borrowck

Copy link
Member Author

Choose a reason for hiding this comment

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

wdym strip? the bodies are already empty

Copy link
Contributor

Choose a reason for hiding this comment

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

Not if they were error free before borrowck. I assumed that was the case here

@oli-obk
Copy link
Contributor

oli-obk commented Feb 9, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 9, 2024

📌 Commit e32c1dd 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 Feb 9, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 9, 2024
…=oli-obk

Fix more `ty::Error` ICEs in MIR passes

Fixes rust-lang#120791 - Add a check for `ty::Error` in the `ByMove` coroutine pass
Fixes rust-lang#120816 - Add a check for `ty::Error` in the MIR validator

Also a drive-by fix for a FIXME I had asked oli to add

r? oli-obk
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 9, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#120308 (core/time: avoid divisions in Duration::new)
 - rust-lang#120589 (std::thread::available_parallelism merging linux/android/freebsd version)
 - rust-lang#120596 ([rustdoc] Correctly generate path for non-local items in source code pages)
 - rust-lang#120672 (std::thread update freebsd stack guard handling.)
 - rust-lang#120693 (Invert diagnostic lints.)
 - rust-lang#120704 (A drive-by rewrite of `give_region_a_name()`)
 - rust-lang#120806 (Clippy subtree update)
 - rust-lang#120809 (Use `transmute_unchecked` in `NonZero::new`.)
 - rust-lang#120817 (Fix more `ty::Error` ICEs in MIR passes)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 9, 2024
…=oli-obk

Fix more `ty::Error` ICEs in MIR passes

Fixes rust-lang#120791 - Add a check for `ty::Error` in the `ByMove` coroutine pass
Fixes rust-lang#120816 - Add a check for `ty::Error` in the MIR validator

Also a drive-by fix for a FIXME I had asked oli to add

r? oli-obk
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 9, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#120308 (core/time: avoid divisions in Duration::new)
 - rust-lang#120596 ([rustdoc] Correctly generate path for non-local items in source code pages)
 - rust-lang#120693 (Invert diagnostic lints.)
 - rust-lang#120704 (A drive-by rewrite of `give_region_a_name()`)
 - rust-lang#120809 (Use `transmute_unchecked` in `NonZero::new`.)
 - rust-lang#120817 (Fix more `ty::Error` ICEs in MIR passes)
 - rust-lang#120828 (Fix `ErrorGuaranteed` unsoundness with stash/steal.)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 9, 2024
…=oli-obk

Fix more `ty::Error` ICEs in MIR passes

Fixes rust-lang#120791 - Add a check for `ty::Error` in the `ByMove` coroutine pass
Fixes rust-lang#120816 - Add a check for `ty::Error` in the MIR validator

Also a drive-by fix for a FIXME I had asked oli to add

r? oli-obk
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 9, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#113026 (Introduce `run-make` V2 infrastructure, a `run_make_support` library and port over 2 tests as example)
 - rust-lang#113671 (Make privacy visitor use types more (instead of HIR))
 - rust-lang#120308 (core/time: avoid divisions in Duration::new)
 - rust-lang#120693 (Invert diagnostic lints.)
 - rust-lang#120704 (A drive-by rewrite of `give_region_a_name()`)
 - rust-lang#120809 (Use `transmute_unchecked` in `NonZero::new`.)
 - rust-lang#120817 (Fix more `ty::Error` ICEs in MIR passes)
 - rust-lang#120828 (Fix `ErrorGuaranteed` unsoundness with stash/steal.)
 - rust-lang#120831 (Startup objects disappearing from sysroot)

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

Rollup of 8 pull requests

Successful merges:

 - rust-lang#113671 (Make privacy visitor use types more (instead of HIR))
 - rust-lang#120308 (core/time: avoid divisions in Duration::new)
 - rust-lang#120693 (Invert diagnostic lints.)
 - rust-lang#120704 (A drive-by rewrite of `give_region_a_name()`)
 - rust-lang#120809 (Use `transmute_unchecked` in `NonZero::new`.)
 - rust-lang#120817 (Fix more `ty::Error` ICEs in MIR passes)
 - rust-lang#120828 (Fix `ErrorGuaranteed` unsoundness with stash/steal.)
 - rust-lang#120831 (Startup objects disappearing from sysroot)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 116efb5 into rust-lang:master Feb 9, 2024
11 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 9, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 9, 2024
Rollup merge of rust-lang#120817 - compiler-errors:more-mir-errors, r=oli-obk

Fix more `ty::Error` ICEs in MIR passes

Fixes rust-lang#120791 - Add a check for `ty::Error` in the `ByMove` coroutine pass
Fixes rust-lang#120816 - Add a check for `ty::Error` in the MIR validator

Also a drive-by fix for a FIXME I had asked oli to add

r? oli-obk
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 26, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#113671 (Make privacy visitor use types more (instead of HIR))
 - rust-lang#120308 (core/time: avoid divisions in Duration::new)
 - rust-lang#120693 (Invert diagnostic lints.)
 - rust-lang#120704 (A drive-by rewrite of `give_region_a_name()`)
 - rust-lang#120809 (Use `transmute_unchecked` in `NonZero::new`.)
 - rust-lang#120817 (Fix more `ty::Error` ICEs in MIR passes)
 - rust-lang#120828 (Fix `ErrorGuaranteed` unsoundness with stash/steal.)
 - rust-lang#120831 (Startup objects disappearing from sysroot)

r? `@ghost`
`@rustbot` modify labels: rollup
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Mar 8, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#113671 (Make privacy visitor use types more (instead of HIR))
 - rust-lang#120308 (core/time: avoid divisions in Duration::new)
 - rust-lang#120693 (Invert diagnostic lints.)
 - rust-lang#120704 (A drive-by rewrite of `give_region_a_name()`)
 - rust-lang#120809 (Use `transmute_unchecked` in `NonZero::new`.)
 - rust-lang#120817 (Fix more `ty::Error` ICEs in MIR passes)
 - rust-lang#120828 (Fix `ErrorGuaranteed` unsoundness with stash/steal.)
 - rust-lang#120831 (Startup objects disappearing from sysroot)

r? `@ghost`
`@rustbot` modify labels: rollup
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: unexpected body ty: {type error} phase Runtime(PostCleanup) ice: coroutine: impossible case reached
4 participants