ICE from public re-export of private enum variant in proc macro #79148
Labels
A-proc-macros
Area: Procedural macros
A-resolve
Area: Name/path resolution done by `rustc_resolve` specifically
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.
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
proc macro:
usage:
ICE is caused by pub re-exporting a single variant of a non-pub enum generated within a proc macro. Cannot be recreated with a declarative macro. marking the enum as
pub
/pub(in super)
, orpub(super)
fixes the issue, whilepub(crate)
andpub(self)
do not.Meta
rustc --version --verbose
:Also recreated on stable:
Error output
Backtrace
*backtrace is from nightly commit ffa2e7a
I'd love to implement a fix, but figured I should make an issue to ensure it's not dupe work first and would appreciate any guidance as far as where to look and possible concerns when fixing.
The text was updated successfully, but these errors were encountered: