fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
2.0 KiB62 linesraw
1warning: private trait `m::PrivTr` in public interface (error E0445)
2  --> $DIR/private-in-public-assoc-ty.rs:16:5
3   |
4LL | /     pub trait PubTr {
5LL | |
6LL | |
7LL | |
8...  |
9LL | |         fn infer_exist() -> Self::Exist;
10LL | |     }
11   | |_____^
12   |
13   = note: `#[warn(private_in_public)]` on by default
14   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
15   = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
16
17warning: private type `m::Priv` in public interface (error E0446)
18  --> $DIR/private-in-public-assoc-ty.rs:16:5
19   |
20LL | /     pub trait PubTr {
21LL | |
22LL | |
23LL | |
24...  |
25LL | |         fn infer_exist() -> Self::Exist;
26LL | |     }
27   | |_____^
28   |
29   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
30   = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
31
32error[E0446]: private type `m::Priv` in public interface
33  --> $DIR/private-in-public-assoc-ty.rs:25:9
34   |
35LL |     struct Priv;
36   |     - `m::Priv` declared as private
37...
38LL |         type Alias4 = Priv;
39   |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
40
41error[E0446]: private type `m::Priv` in public interface
42  --> $DIR/private-in-public-assoc-ty.rs:32:9
43   |
44LL |     struct Priv;
45   |     - `m::Priv` declared as private
46...
47LL |         type Alias1 = Priv;
48   |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
49
50error[E0445]: private trait `m::PrivTr` in public interface
51  --> $DIR/private-in-public-assoc-ty.rs:35:9
52   |
53LL |     trait PrivTr {}
54   |     - `m::PrivTr` declared as private
55...
56LL |         type Exist = impl PrivTr;
57   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
58
59error: aborting due to 3 previous errors
60
61Some errors have detailed explanations: E0445, E0446.
62For more information about an error, try `rustc --explain E0445`.