mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
error[E0445]: private trait `Private<<Self as Public>::P, <Self as Public>::R>` in public interface
|
|
--> $DIR/issue-18389.rs:14:1
|
|
|
|
|
LL | trait Private<P, R> {
|
|
| ------------------- `Private<<Self as Public>::P, <Self as Public>::R>` declared as private
|
|
...
|
|
LL | / pub trait Public: Private<
|
|
LL | |
|
|
LL | |
|
|
LL | | <Self as Public>::P,
|
|
LL | | <Self as Public>::R
|
|
LL | | > {
|
|
| |_^ can't leak private trait
|
|
|
|
warning: trait `Private<<Self as Public>::P, <Self as Public>::R>` is more private than the item `Public`
|
|
--> $DIR/issue-18389.rs:14:1
|
|
|
|
|
LL | / pub trait Public: Private<
|
|
LL | |
|
|
LL | |
|
|
LL | | <Self as Public>::P,
|
|
LL | | <Self as Public>::R
|
|
LL | | > {
|
|
| |_^ trait `Public` is reachable at visibility `pub`
|
|
|
|
|
note: but trait `Private<<Self as Public>::P, <Self as Public>::R>` is only usable at visibility `pub(crate)`
|
|
--> $DIR/issue-18389.rs:11:1
|
|
|
|
|
LL | trait Private<P, R> {
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
note: the lint level is defined here
|
|
--> $DIR/issue-18389.rs:2:9
|
|
|
|
|
LL | #![warn(private_bounds)]
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to previous error; 1 warning emitted
|
|
|
|
For more information about this error, try `rustc --explain E0445`.
|