Skip to content

Disallow importing private items #4073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

catamorphism
Copy link
Contributor

resolve wasn't checking that a use referred to a public item.

r? @brson

resolve wasn't checking that a `use` referred to a public item.
@brson
Copy link
Contributor

brson commented Nov 29, 2012

nice! r+

@brson
Copy link
Contributor

brson commented Nov 30, 2012

I'm seeing some oddities, presumably as a side effect of this patch.

I have a mod like

pub mod flatteners {
    pub struct SerializingFlattener { ... };
    impl SerializingFlattener { ... };
}

And I can no longer import flatteners::SerializingFlattener because the impl isn't pub (changing it to pub works). Is this intentional?

@catamorphism
Copy link
Contributor Author

It's not intentional. Are impls and structs separate namespaces?

@catamorphism
Copy link
Contributor Author

Patch is merged -- @brson , open a bug for the struct/impl thing if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants