impl
type aliases depending on lifetimes introduced by function pointers cause an ICE
#109636
Labels
C-bug
Category: This is a bug.
F-type_alias_impl_trait
`#[feature(type_alias_impl_trait)]`
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.
I found an ICE while attempting to use an
impl
type alias in a function pointer type while playing around withtype_alias_impl_trait
.Here's the playground link to the snippet above, which was running
rustc 1.70.0-nightly (0c61c7a97 2023-03-25) running on x86_64-unknown-linux-gnu
at the time of the panic.The head of the panic is as follows:
Full Error Message
The error is also reproducible with HRTBs.
Here's the playground link to the above snippet, which was running
note: rustc 1.70.0-nightly (0c61c7a97 2023-03-25) running on x86_64-unknown-linux-gnu
at the time of the panic.The head of the panic is identical to the head of the first panic.
Full Error Message
If, however, the lifetime provided to the type alias is not higher-ranked (is this appropriate terminology??), but rather originates from the function itself, the compiler does not panic.
Here's the playground link to the above snippet, which was presumably also running
rustc 1.70.0-nightly (0c61c7a97 2023-03-25) running on x86_64-unknown-linux-gnu
at the time of the panicn't.The text was updated successfully, but these errors were encountered: