ICE when initializing static array of struct containing function pointer using const function #86679
Labels
C-bug
Category: This is a bug.
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.
Code
I think it's worth noting that the error goes away if we either:
f
field fromThing
(or just remove thefor<'a>
from the function signature and replace thePhantomData<&'a ()>
with justPhantomData<()>
);bad_hash
in secondThing
'sh
field initialization with a literal (e.g.0
for example);Meta
The bug also happens on beta and nightly.
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: