2018-07-15 21:11:54 +00:00
|
|
|
error[E0445]: private trait `Private<<Self as Public>::P, <Self as Public>::R>` in public interface
|
2023-06-15 12:47:38 +00:00
|
|
|
--> $DIR/issue-18389.rs:14:1
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
2018-12-16 13:18:45 +00:00
|
|
|
LL | trait Private<P, R> {
|
2020-10-16 23:28:11 +00:00
|
|
|
| ------------------- `Private<<Self as Public>::P, <Self as Public>::R>` declared as private
|
2018-12-16 13:18:45 +00:00
|
|
|
...
|
2018-07-15 21:11:54 +00:00
|
|
|
LL | / pub trait Public: Private<
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | |
|
2023-06-29 13:24:07 +00:00
|
|
|
LL | |
|
2018-07-15 21:11:54 +00:00
|
|
|
LL | | <Self as Public>::P,
|
|
|
|
LL | | <Self as Public>::R
|
2022-02-13 15:27:59 +00:00
|
|
|
LL | | > {
|
2018-07-15 21:11:54 +00:00
|
|
|
| |_^ can't leak private trait
|
|
|
|
|
2023-05-18 11:57:45 +00:00
|
|
|
warning: trait `Private<<Self as Public>::P, <Self as Public>::R>` is more private than the item `Public`
|
2023-06-15 12:47:38 +00:00
|
|
|
--> $DIR/issue-18389.rs:14:1
|
2023-05-18 11:57:45 +00:00
|
|
|
|
|
|
|
|
LL | / pub trait Public: Private<
|
|
|
|
LL | |
|
2023-06-29 13:24:07 +00:00
|
|
|
LL | |
|
2023-05-18 11:57:45 +00:00
|
|
|
LL | | <Self as Public>::P,
|
|
|
|
LL | | <Self as Public>::R
|
|
|
|
LL | | > {
|
2023-06-29 13:24:07 +00:00
|
|
|
| |_^ trait `Public` is reachable at visibility `pub`
|
|
|
|
|
|
2023-05-18 11:57:45 +00:00
|
|
|
note: but trait `Private<<Self as Public>::P, <Self as Public>::R>` is only usable at visibility `pub(crate)`
|
2023-06-15 12:47:38 +00:00
|
|
|
--> $DIR/issue-18389.rs:11:1
|
2023-05-18 11:57:45 +00:00
|
|
|
|
|
|
|
|
LL | trait Private<P, R> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: the lint level is defined here
|
2023-06-15 12:47:38 +00:00
|
|
|
--> $DIR/issue-18389.rs:2:9
|
2023-05-18 11:57:45 +00:00
|
|
|
|
|
|
|
|
LL | #![warn(private_bounds)]
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to previous error; 1 warning emitted
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0445`.
|