Two examples:
#![feature(core)]
#![crate_type = "lib"]
pub extern crate core;
That is accepted but core cannot be accessed from outside the crate.
#![feature(core)]
#![crate_type = "lib"]
mod foo {
extern crate core;
// behaves identically
// pub extern crate core;
}
pub use foo::core;
That is accepted and reexports core.
In other words, extern crate is always public to other modules, but can never be made public to other crates.
There are no tests for pub extern crate so I suspect this is not intentional.
Two examples:
That is accepted but
corecannot be accessed from outside the crate.That is accepted and reexports
core.In other words,
extern crateis always public to other modules, but can never be made public to other crates.There are no tests for
pub extern crateso I suspect this is not intentional.