fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

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