-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics
Description
When trying to reexport the variants of a private enum, a diagnostic is emitted for each variant pointing always at the same reexport span, making it too verbose:
error: variant `Variant1` is private, and cannot be reexported, consider declaring its enum as `pub`
--> file.rs:12:9
|
12 | pub use self::Enum::*;
| ^^^^^^^^^^^^^
(...)
error: variant `VariantN` is private, and cannot be reexported, consider declaring its enum as `pub`
--> file.rs:12:9
|
12 | pub use self::Enum::*;
| ^^^^^^^^^^^^^
Ideally there would be only one diagnostic emitted, with an extra span pointing at the definition of Enum
to suggest making it public.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.WG-diagnosticsWorking group: DiagnosticsWorking group: Diagnostics