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.