ICE: Awfully specific error on nightly when mixing recursive structs and associated constants used in a generic_const_exprs
bound for a blanket impl, with an implementation for the struct that recurses into its child
#98322
Labels
C-bug
Category: This is a bug.
F-generic_const_exprs
`#![feature(generic_const_exprs)]`
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
requires-incomplete-features
This issue requires the use of incomplete features.
requires-nightly
This issue requires a nightly compiler in some way.
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Let me start by saying I have no idea what this code breaks or how, but this is the smallest I could get it.
It appears that making the impl recursively call the struct's child is important to trigger it.
Error reproducible in playground
Code
Meta
rustc --version --verbose
:Error output
Backtrace
EDIT: Realized I was running an old version of nightly. Logs are updated to show errors at
rustc 1.63.0-nightly (dc80ca78b 2022-06-21) running on x86_64-unknown-linux-gnu
. Also showing the full backtrace.EDIT 2: Simplified trait names and added comments.
EDIT 3: Clarified a sentence
EDIT 4: Updated playground link
The text was updated successfully, but these errors were encountered: