mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 12:44:40 +00:00
20 lines
263 B
Rust
20 lines
263 B
Rust
#![allow(warnings)]
|
|
|
|
mod foo {
|
|
pub mod bar {
|
|
pub struct S {
|
|
pub(in foo) x: i32,
|
|
}
|
|
}
|
|
|
|
fn f() {
|
|
use foo::bar::S;
|
|
S { x: 0 }; // ok
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
use foo::bar::S;
|
|
S { x: 0 }; //~ ERROR private
|
|
}
|