rust/tests/ui/issues/issue-18389.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.2 KiB
Plaintext
Raw Normal View History

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