-
Notifications
You must be signed in to change notification settings - Fork 13.3k
const generic ty's with lifetimes cause opaque types to ICE #111911
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
Labels
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-adt_const_params
`#![feature(adt_const_params)]`
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Comments
This is specifically to do with having a lifetime in a const generic's ty that is in the substs of an opaque ty, the following code is also buggy except it ICEs: #![feature(adt_const_params)]
fn foo<const N: &'static u8>() -> impl Sized {} Backtrace
|
adt_const_params
incompatible with async functions
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Apr 27, 2024
blyxyas
pushed a commit
to blyxyas/rust
that referenced
this issue
Apr 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-const-generics
Area: const generics (parameters and arguments)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-adt_const_params
`#![feature(adt_const_params)]`
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Due to the desugaring of async functions, the
adt_const_params
feature prevents usage of non-numeric const params as parameters to async functions, or to impl blocks containing async functions.For example:
yields the following error:
#95174
The text was updated successfully, but these errors were encountered: