summaryrefslogtreecommitdiffstats
path: root/tests/ui/privacy/private-in-public-assoc-ty.stderr
blob: 0931e6d9971ea9699e23c7aa77b2040dde51fbf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
error[E0446]: private type `Priv` in public interface
  --> $DIR/private-in-public-assoc-ty.rs:17:9
   |
LL |     struct Priv;
   |     ----------- `Priv` declared as private
...
LL |         type A = Priv;
   |         ^^^^^^ can't leak private type

warning: trait `PrivTr` is more private than the item `PubTr::Alias1`
  --> $DIR/private-in-public-assoc-ty.rs:24:9
   |
LL |         type Alias1: PrivTr;
   |         ^^^^^^^^^^^^^^^^^^^ associated type `PubTr::Alias1` is reachable at visibility `pub(crate)`
   |
note: but trait `PrivTr` is only usable at visibility `pub(self)`
  --> $DIR/private-in-public-assoc-ty.rs:9:5
   |
LL |     trait PrivTr {}
   |     ^^^^^^^^^^^^
   = note: `#[warn(private_bounds)]` on by default

warning: type `Priv` is more private than the item `PubTr::Alias2`
  --> $DIR/private-in-public-assoc-ty.rs:26:9
   |
LL |         type Alias2: PubTrAux1<Priv> = u8;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated type `PubTr::Alias2` is reachable at visibility `pub(crate)`
   |
note: but type `Priv` is only usable at visibility `pub(self)`
  --> $DIR/private-in-public-assoc-ty.rs:8:5
   |
LL |     struct Priv;
   |     ^^^^^^^^^^^

warning: type `Priv` is more private than the item `PubTr::Alias3`
  --> $DIR/private-in-public-assoc-ty.rs:28:9
   |
LL |         type Alias3: PubTrAux2<A = Priv> = u8;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated type `PubTr::Alias3` is reachable at visibility `pub(crate)`
   |
note: but type `Priv` is only usable at visibility `pub(self)`
  --> $DIR/private-in-public-assoc-ty.rs:8:5
   |
LL |     struct Priv;
   |     ^^^^^^^^^^^

error[E0446]: private type `Priv` in public interface
  --> $DIR/private-in-public-assoc-ty.rs:31:9
   |
LL |     struct Priv;
   |     ----------- `Priv` declared as private
...
LL |         type Alias4 = Priv;
   |         ^^^^^^^^^^^ can't leak private type

error[E0446]: private type `Priv` in public interface
  --> $DIR/private-in-public-assoc-ty.rs:38:9
   |
LL |     struct Priv;
   |     ----------- `Priv` declared as private
...
LL |         type Alias1 = Priv;
   |         ^^^^^^^^^^^ can't leak private type

error[E0446]: private trait `PrivTr` in public interface
  --> $DIR/private-in-public-assoc-ty.rs:41:9
   |
LL |     trait PrivTr {}
   |     ------------ `PrivTr` declared as private
...
LL |         type Exist = impl PrivTr;
   |         ^^^^^^^^^^ can't leak private trait

error: aborting due to 4 previous errors; 3 warnings emitted

For more information about this error, try `rustc --explain E0446`.