-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
ICE: TAIT issue-96572-unconstrained-upvar.rs with edition=2021 #99363
Comments
This will be fixed by #99383 |
@ouz-a assigned you the task! |
Improves the compiler error backtrace information, as shown in rust-lang#99363, by using `span_bug` instead of `bug`. New output: ``` build/aarch64-apple-darwin/stage1/bin/rustc /tmp/test.rs --edition=2021 error: internal compiler error: compiler/rustc_middle/src/ty/closure.rs:185:25: Unexpected type Opaque(DefId(0:5 ~ test[db0f]::main::T::{opaque#0}), []) for `Field` projection --> /tmp/test.rs:11:27 | 11 | let Foo((a, b)) = foo; | ^^^ thread 'rustc' panicked at 'Box<dyn Any>', /Users/jmq/src/forked/rust/compiler/rustc_errors/src/lib.rs:1331:9 stack backtrace: ``` (Remainder of output truncated.)
I am sorry I tested this wrongly so it won't be fixed by it. 😿 |
No worries! @ouz-a, do you still want to investigate the issue? Otherwise you can just |
Yeah, I would like to take a shot at it. |
Use span_bug for unexpected field projection type Improves the compiler error backtrace information, as shown in rust-lang#99363, by using `span_bug` instead of `bug`. New output: ``` build/aarch64-apple-darwin/stage1/bin/rustc /tmp/test.rs --edition=2021 error: internal compiler error: compiler/rustc_middle/src/ty/closure.rs:185:25: Unexpected type Opaque(DefId(0:5 ~ test[db0f]::main::T::{opaque#0}), []) for `Field` projection --> /tmp/test.rs:11:27 | 11 | let Foo((a, b)) = foo; | ^^^ thread 'rustc' panicked at 'Box<dyn Any>', /Users/jmq/src/forked/rust/compiler/rustc_errors/src/lib.rs:1331:9 stack backtrace: ``` (Remainder of output truncated.)
Use span_bug for unexpected field projection type Improves the compiler error backtrace information, as shown in rust-lang#99363, by using `span_bug` instead of `bug`. New output: ``` build/aarch64-apple-darwin/stage1/bin/rustc /tmp/test.rs --edition=2021 error: internal compiler error: compiler/rustc_middle/src/ty/closure.rs:185:25: Unexpected type Opaque(DefId(0:5 ~ test[db0f]::main::T::{opaque#0}), []) for `Field` projection --> /tmp/test.rs:11:27 | 11 | let Foo((a, b)) = foo; | ^^^ thread 'rustc' panicked at 'Box<dyn Any>', /Users/jmq/src/forked/rust/compiler/rustc_errors/src/lib.rs:1331:9 stack backtrace: ``` (Remainder of output truncated.)
Use span_bug for unexpected field projection type Improves the compiler error backtrace information, as shown in rust-lang#99363, by using `span_bug` instead of `bug`. New output: ``` build/aarch64-apple-darwin/stage1/bin/rustc /tmp/test.rs --edition=2021 error: internal compiler error: compiler/rustc_middle/src/ty/closure.rs:185:25: Unexpected type Opaque(DefId(0:5 ~ test[db0f]::main::T::{opaque#0}), []) for `Field` projection --> /tmp/test.rs:11:27 | 11 | let Foo((a, b)) = foo; | ^^^ thread 'rustc' panicked at 'Box<dyn Any>', /Users/jmq/src/forked/rust/compiler/rustc_errors/src/lib.rs:1331:9 stack backtrace: ``` (Remainder of output truncated.)
This now crashes even without --edition=2021 |
Yes, the fix was reverted in #99495 because of bad perf. |
🥲 |
Fixed on the latest nightly, marking as E-needs-test (or, feel free to close if we have a sufficient regression test) |
looks like type-alias-impl-trait/issue-96572-unconstrained.rs covers this already, closing |
./src/test/ui/type-alias-impl-trait/issue-96572-unconstrained-upvar.rs
Code
Meta
rustc --version --verbose
:Error output
rustc ./src/test/ui/type-alias-impl-trait/issue-96572-unconstrained-upvar.rs --edition=2021
Backtrace
The text was updated successfully, but these errors were encountered: