2021-07-26 15:01:16 -05:00
|
|
|
error[E0446]: private type `Priv` in public interface
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:17:9
|
|
|
|
|
|
|
|
|
LL | struct Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ----------- `Priv` declared as private
|
2021-07-26 15:01:16 -05:00
|
|
|
...
|
|
|
|
LL | type A = Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^ can't leak private type
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
warning: private trait `PrivTr` in public interface (error E0445)
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:24:9
|
|
|
|
|
|
|
|
|
LL | type Alias1: PrivTr;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
|
|
|
= note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: `#[warn(private_in_public)]` on by default
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
warning: private type `Priv` in public interface (error E0446)
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:27:9
|
|
|
|
|
|
|
|
|
LL | type Alias2: PubTrAux1<Priv> = u8;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
|
|
|
= note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
|
|
|
|
|
|
|
|
warning: private type `Priv` in public interface (error E0446)
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:30:9
|
|
|
|
|
|
|
|
|
LL | type Alias3: PubTrAux2<A = Priv> = u8;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
|
|
|
= note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
|
|
|
|
|
|
|
|
error[E0446]: private type `Priv` in public interface
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:34:9
|
|
|
|
|
|
|
|
|
LL | struct Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ----------- `Priv` declared as private
|
2021-07-26 15:01:16 -05:00
|
|
|
...
|
|
|
|
LL | type Alias4 = Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^^ can't leak private type
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
error[E0446]: private type `Priv` in public interface
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:41:9
|
|
|
|
|
|
|
|
|
LL | struct Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ----------- `Priv` declared as private
|
2021-07-26 15:01:16 -05:00
|
|
|
...
|
|
|
|
LL | type Alias1 = Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^^ can't leak private type
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
error[E0445]: private trait `PrivTr` in public interface
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:44:9
|
|
|
|
|
|
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ------------ `PrivTr` declared as private
|
|
|
|
...
|
|
|
|
LL | type Exist = impl PrivTr;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^ can't leak private trait
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
error: aborting due to 4 previous errors; 3 warnings emitted
|
|
|
|
|
|
|
|
Some errors have detailed explanations: E0445, E0446.
|
|
|
|
For more information about an error, try `rustc --explain E0445`.
|