|
1 |
| -error[E0118]: no nominal type found for inherent implementation |
2 |
| - --> $DIR/private-in-public-ill-formed.rs:14:10 |
| 1 | +error[E0446]: private type `aliases_pub::Priv` in public interface |
| 2 | + --> $DIR/private-in-public-ill-formed.rs:15:9 |
3 | 3 | |
|
4 |
| -LL | impl <Priv as PrivTr>::AssocAlias { |
5 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type |
6 |
| - | |
7 |
| - = note: either implement a trait on it or create a newtype to wrap it instead |
| 4 | +LL | struct Priv; |
| 5 | + | ----------- `aliases_pub::Priv` declared as private |
| 6 | +... |
| 7 | +LL | pub fn f(arg: Priv) {} |
| 8 | + | ^^^^^^^^^^^^^^^^^^^ can't leak private type |
8 | 9 |
|
9 |
| -error[E0118]: no nominal type found for inherent implementation |
10 |
| - --> $DIR/private-in-public-ill-formed.rs:31:10 |
| 10 | +error[E0445]: private trait `aliases_pub::PrivTr` in public interface |
| 11 | + --> $DIR/private-in-public-ill-formed.rs:15:9 |
11 | 12 | |
|
12 |
| -LL | impl <Priv as PrivTr>::AssocAlias { |
13 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl requires a nominal type |
| 13 | +LL | trait PrivTr { |
| 14 | + | ------------ `aliases_pub::PrivTr` declared as private |
| 15 | +... |
| 16 | +LL | pub fn f(arg: Priv) {} |
| 17 | + | ^^^^^^^^^^^^^^^^^^^ can't leak private trait |
| 18 | + |
| 19 | +error[E0446]: private type `aliases_pub::Priv` in public interface |
| 20 | + --> $DIR/private-in-public-ill-formed.rs:15:9 |
14 | 21 | |
|
15 |
| - = note: either implement a trait on it or create a newtype to wrap it instead |
| 22 | +LL | struct Priv; |
| 23 | + | ----------- `aliases_pub::Priv` declared as private |
| 24 | +... |
| 25 | +LL | pub fn f(arg: Priv) {} |
| 26 | + | ^^^^^^^^^^^^^^^^^^^ can't leak private type |
16 | 27 |
|
17 |
| -error: aborting due to 2 previous errors |
| 28 | +error: aborting due to 3 previous errors |
18 | 29 |
|
19 |
| -For more information about this error, try `rustc --explain E0118`. |
| 30 | +Some errors have detailed explanations: E0445, E0446. |
| 31 | +For more information about an error, try `rustc --explain E0445`. |
0 commit comments