Skip to content

Enum variants are always exported cross-crate #11680

Closed
@huonw

Description

@huonw
// foo.rs
enum Foo {
    Bar(int)
}
extern mod foo;

fn main() {
    println!("{:?}", foo::Bar(1))
}

The above compiles fine, and, adding an explicit priv to Bar emits an error about unnecessary priv.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specifically

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions