fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
661 B21 linesraw
1error[E0446]: private type `m1::Priv` in public interface
2  --> $DIR/private-in-public-lint.rs:6:9
3   |
4LL |     struct Priv;
5   |     - `m1::Priv` declared as private
6...
7LL |         pub fn f() -> Priv {Priv}
8   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
9
10error[E0446]: private type `m2::Priv` in public interface
11  --> $DIR/private-in-public-lint.rs:15:9
12   |
13LL |     struct Priv;
14   |     - `m2::Priv` declared as private
15...
16LL |         pub fn f() -> Priv {Priv}
17   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private type
18
19error: aborting due to 2 previous errors
20
21For more information about this error, try `rustc --explain E0446`.