Closed
Description
a.rs:
#![crate_type = "lib"]
pub use private::P;
pub struct S {
p: P,
}
mod private { // `pub mod` solves problem
pub struct P {
p: i32,
}
pub static THREE: P = P { p: 3 };
}
pub static A: S = S { p: private::THREE };
b.rs:
extern crate a;
fn main() {
let B: a::S = a::A;
}
Building b.rs
with --debuginfo=1
causes link error:
note: b.o:(.debug_info+0xb3): undefined reference to `private::THREE::ha5edf056fc0d59b6oaa::v0.0'
I have no idea if this is sub-bug of #11685 or not: is it illegal to use private::THREE
in pub static A
?