2020-09-09 15:42:37 +01:00
|
|
|
pub mod foo {
|
|
|
|
|
pub struct Foo {
|
|
|
|
|
you_cant_use_this_field: bool,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
foo::Foo {};
|
2022-06-20 16:29:05 +09:00
|
|
|
//~^ ERROR cannot construct `Foo` with struct literal syntax due to private fields
|
2020-09-09 15:42:37 +01:00
|
|
|
}
|