Skip to content
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

extern crate privacy is "public" without requiring "pub". #29654

Closed
eddyb opened this Issue Nov 6, 2015 · 2 comments

Comments

Projects
None yet
5 participants
@eddyb
Copy link
Member

eddyb commented Nov 6, 2015

mod foo {
    extern crate std;
}

fn main() {
    println!("{}", foo::std::mem::size_of::<i32>());
}

Try on playpen.

This is due to is_public being true for all ItemExternCrate regardless of whether they are pub.

Even then, pub extern crate is not handled correctly in all cases, see #26775.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Nov 12, 2015

triage: P-high

@nikomatsakis nikomatsakis added T-lang and removed P-high labels Nov 12, 2015

@nrc nrc self-assigned this Nov 12, 2015

@nrc

This comment has been minimized.

Copy link
Member

nrc commented Nov 16, 2015

I'm going to close this and discuss further on #26775 - the two issues are very connected and that issue has more discussion.

This is due to is_public being true for all ItemExternCrate regardless of whether they are pub.

This is not the case - is_public there is referring to the module itself, not the importing directive, so being true all the time is correct. More on #26775.

@nrc nrc closed this Nov 16, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.