2019-02-11 19:29:10 +01:00
|
|
|
mod foo {
|
2023-01-08 01:15:28 +00:00
|
|
|
pub struct Bx(pub(in crate::foo) ());
|
2019-02-11 19:29:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mod bar {
|
2025-06-05 08:41:49 +02:00
|
|
|
use crate::foo::Bx;
|
2019-02-11 19:29:10 +01:00
|
|
|
|
|
|
|
|
fn foo() {
|
2020-06-13 20:58:46 +03:00
|
|
|
Bx(());
|
2020-10-26 14:36:48 +00:00
|
|
|
//~^ ERROR cannot initialize a tuple struct which contains private fields [E0423]
|
2019-02-11 19:29:10 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mod baz {
|
|
|
|
|
fn foo() {
|
2020-06-13 20:58:46 +03:00
|
|
|
Bx(());
|
|
|
|
|
//~^ ERROR cannot find function, tuple struct or tuple variant `Bx` in this scope [E0425]
|
2019-02-11 19:29:10 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|