-
Notifications
You must be signed in to change notification settings - Fork 13k
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: Unexpected type Alias(...) for 'Field' projection
, edition 2021
#105819
Comments
Regression in nightly-2022-03-31, perhaps from #94081 (CC @oli-obk) Commits in range
|
That's weird, this showed up in my nightly ice gathering as something new (from yesterday to today) but I guess the ICE just changed? with nightly I get |
Indeed, the ICE changed in nightly-2022-12-17 due to #103880 |
couldn't create field type, unexpected base type: upvar::T
, edition 2021Unexpected type Alias(...) for
Field projection
, edition 2021
Unexpected type Alias(...) for
Field projection
, edition 2021Unexpected type Alias(...) for 'Field' projection
, edition 2021
Update backtrace: Backtrace
|
This is because precise captures (the |
…ction, r=cjgillot Perform OpaqueCast field projection on HIR, too. fixes rust-lang#105819 This is necessary for closure captures in 2021 edition, as they capture individual fields, not the full mentioned variables. So it may try to capture a field of an opaque (because the hidden type is known to be something with a field). See rust-lang#99806 for when and why we added OpaqueCast to MIR.
…ction, r=cjgillot Perform OpaqueCast field projection on HIR, too. fixes rust-lang#105819 This is necessary for closure captures in 2021 edition, as they capture individual fields, not the full mentioned variables. So it may try to capture a field of an opaque (because the hidden type is known to be something with a field). See rust-lang#99806 for when and why we added OpaqueCast to MIR.
…ction, r=cjgillot Perform OpaqueCast field projection on HIR, too. fixes rust-lang#105819 This is necessary for closure captures in 2021 edition, as they capture individual fields, not the full mentioned variables. So it may try to capture a field of an opaque (because the hidden type is known to be something with a field). See rust-lang#99806 for when and why we added OpaqueCast to MIR.
Code
src/test/ui/type-alias-impl-trait/issue-96572-unconstrained.rs
Meta
rustc --version --verbose
:Error output
rustc issue-96572-unconstrained.rs --edition=2021
Backtrace
The text was updated successfully, but these errors were encountered: