]> git.lizzy.rs Git - rust.git/blob - tests/ui/privacy/private-in-public-lint.rs
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / ui / privacy / private-in-public-lint.rs
1 mod m1 {
2     pub struct Pub;
3     struct Priv;
4
5     impl Pub {
6         pub fn f() -> Priv {Priv} //~ ERROR private type `m1::Priv` in public interface
7     }
8 }
9
10 mod m2 {
11     pub struct Pub;
12     struct Priv;
13
14     impl Pub {
15         pub fn f() -> Priv {Priv} //~ ERROR private type `m2::Priv` in public interface
16     }
17 }
18
19 fn main() {}