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
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
warning: trait `PrivTr` is more private than the item `PubTr::Alias1`
|
2021-07-26 15:01:16 -05:00
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:24:9
|
|
|
|
|
|
|
|
|
LL | type Alias1: PrivTr;
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ associated type `PubTr::Alias1` is reachable at visibility `pub(crate)`
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but trait `PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:9:5
|
|
|
|
|
|
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
= note: `#[warn(private_bounds)]` on by default
|
2021-07-26 15:01:16 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
warning: type `Priv` is more private than the item `PubTr::Alias2`
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:26:9
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
LL | type Alias2: PubTrAux1<Priv> = u8;
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated type `PubTr::Alias2` is reachable at visibility `pub(crate)`
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but type `Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:8:5
|
|
|
|
|
|
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2021-07-26 15:01:16 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
warning: type `Priv` is more private than the item `PubTr::Alias3`
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:28:9
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
LL | type Alias3: PubTrAux2<A = Priv> = u8;
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated type `PubTr::Alias3` is reachable at visibility `pub(crate)`
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but type `Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:8:5
|
|
|
|
|
|
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
error[E0446]: private type `Priv` in public interface
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:31:9
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
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
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:38:9
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
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
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error[E0446]: private trait `PrivTr` in public interface
|
|
|
|
--> $DIR/private-in-public-assoc-ty.rs:41:9
|
2021-07-26 15:01:16 -05:00
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
For more information about this error, try `rustc --explain E0446`.
|