-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
ICE from public re-export of private enum variant in proc macro #79148
Copy link
Copy link
Closed
Labels
A-proc-macrosArea: Procedural macrosArea: Procedural macrosA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-proc-macrosArea: Procedural macrosArea: Procedural macrosA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.