fork/rust

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

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
2.7 KiB86 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
32warning: private type `m::Priv` in public interface (error E0446)
33  --> $DIR/private-in-public-assoc-ty.rs:16:5
34   |
35LL | /     pub trait PubTr {
36LL | |
37LL | |
38LL | |
39...  |
40LL | |         fn infer_exist() -> Self::Exist;
41LL | |     }
42   | |_____^
43   |
44   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
45   = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
46
47error[E0446]: private type `m::Priv` in public interface
48  --> $DIR/private-in-public-assoc-ty.rs:27:9
49   |
50LL |     struct Priv;
51   |     - `m::Priv` declared as private
52...
53LL |         type Alias4 = Priv;
54   |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
55
56error[E0446]: private type `m::Priv` in public interface
57  --> $DIR/private-in-public-assoc-ty.rs:34:9
58   |
59LL |     struct Priv;
60   |     - `m::Priv` declared as private
61...
62LL |         type Alias1 = Priv;
63   |         ^^^^^^^^^^^^^^^^^^^ can't leak private type
64
65error[E0445]: private trait `m::PrivTr` in public interface
66  --> $DIR/private-in-public-assoc-ty.rs:37:9
67   |
68LL |     trait PrivTr {}
69   |     - `m::PrivTr` declared as private
70...
71LL |         type Exist = impl PrivTr;
72   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
73
74error[E0445]: private trait `m::PrivTr` in public interface
75  --> $DIR/private-in-public-assoc-ty.rs:37:9
76   |
77LL |     trait PrivTr {}
78   |     - `m::PrivTr` declared as private
79...
80LL |         type Exist = impl PrivTr;
81   |         ^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak private trait
82
83error: aborting due to 4 previous errors
84
85Some errors have detailed explanations: E0445, E0446.
86For more information about an error, try `rustc --explain E0445`.