rust/tests/ui/privacy/issue-30079.stderr

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

35 lines
1.2 KiB
Plaintext
Raw Normal View History

warning: type `m1::Priv` is more private than the item `m1::<impl SemiPriv>::f`
2018-12-25 15:56:47 +00:00
--> $DIR/issue-30079.rs:6:9
2018-07-15 21:11:54 +00:00
|
2019-03-09 12:03:44 +00:00
LL | pub fn f(_: Priv) {}
| ^^^^^^^^^^^^^^^^^ associated function `m1::<impl SemiPriv>::f` is reachable at visibility `pub(crate)`
2018-07-15 21:11:54 +00:00
|
note: but type `m1::Priv` is only usable at visibility `pub(self)`
--> $DIR/issue-30079.rs:4:5
|
LL | struct Priv;
| ^^^^^^^^^^^
= note: `#[warn(private_interfaces)]` on by default
2018-07-15 21:11:54 +00:00
error[E0446]: private type `m2::Priv` in public interface
--> $DIR/issue-30079.rs:17:9
2018-07-15 21:11:54 +00:00
|
LL | struct Priv;
2022-02-13 15:27:59 +00:00
| ----------- `m2::Priv` declared as private
2018-07-15 21:11:54 +00:00
LL | impl ::std::ops::Deref for ::SemiPriv {
2019-03-09 12:03:44 +00:00
LL | type Target = Priv;
2022-02-13 15:27:59 +00:00
| ^^^^^^^^^^^ can't leak private type
2018-07-15 21:11:54 +00:00
error[E0446]: private type `m3::Priv` in public interface
--> $DIR/issue-30079.rs:34:9
2018-07-15 21:11:54 +00:00
|
LL | struct Priv;
2022-02-13 15:27:59 +00:00
| ----------- `m3::Priv` declared as private
2018-07-15 21:11:54 +00:00
LL | impl ::SemiPrivTrait for () {
2019-03-09 12:03:44 +00:00
LL | type Assoc = Priv;
2022-02-13 15:27:59 +00:00
| ^^^^^^^^^^ can't leak private type
2018-07-15 21:11:54 +00:00
error: aborting due to 2 previous errors; 1 warning emitted
2018-07-15 21:11:54 +00:00
For more information about this error, try `rustc --explain E0446`.