mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
20 lines
331 B
Rust
20 lines
331 B
Rust
mod m1 {
|
|
pub struct Pub;
|
|
struct Priv;
|
|
|
|
impl Pub {
|
|
pub fn f() -> Priv {Priv} //~ ERROR private type `m1::Priv` in public interface
|
|
}
|
|
}
|
|
|
|
mod m2 {
|
|
pub struct Pub;
|
|
struct Priv;
|
|
|
|
impl Pub {
|
|
pub fn f() -> Priv {Priv} //~ ERROR private type `m2::Priv` in public interface
|
|
}
|
|
}
|
|
|
|
fn main() {}
|