mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
14 lines
233 B
Rust
14 lines
233 B
Rust
mod m {
|
|
pub struct Foo { x: u8 }
|
|
|
|
pub struct Bar(u8);
|
|
}
|
|
|
|
use m::{Foo, Bar};
|
|
|
|
fn main() {
|
|
let x = Foo { x: 12 };
|
|
let y = Bar(12);
|
|
//~^ ERROR cannot initialize a tuple struct which contains private fields [E0423]
|
|
}
|