about summary refs log tree commit diff
path: root/tests/ui/privacy/projections.stderr
blob: addb6a075a282dcb6cdee5bd4b87a7a7b2b74dba (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
error[E0446]: private type `Priv` in public interface
  --> $DIR/projections.rs:24:5
   |
LL |     struct Priv;
   |     ----------- `Priv` declared as private
...
LL |     type A<T> = m::Leak;
   |     ^^^^^^^^^ can't leak private type

error[E0446]: private type `Priv` in public interface
  --> $DIR/projections.rs:39:5
   |
LL |     struct Priv;
   |     ----------- `Priv` declared as private
...
LL |     type A<T: Trait> = T::A<m::Leak>;
   |     ^^^^^^^^^^^^^^^^ can't leak private type

warning: type `Priv` is more private than the item `Leak`
  --> $DIR/projections.rs:3:5
   |
LL |     pub type Leak = Priv;
   |     ^^^^^^^^^^^^^ type alias `Leak` is reachable at visibility `pub(crate)`
   |
note: but type `Priv` is only usable at visibility `pub(self)`
  --> $DIR/projections.rs:2:5
   |
LL |     struct Priv;
   |     ^^^^^^^^^^^
   = note: `#[warn(private_interfaces)]` on by default

error: type `Priv` is private
  --> $DIR/projections.rs:14:15
   |
LL | fn check() -> <u8 as Trait>::A<m::Leak> {
   |               ^^^^^^^^^^^^^^^^^^^^^^^^^ private type

error: type `Priv` is private
  --> $DIR/projections.rs:29:39
   |
LL |   fn check2() -> <u8 as Trait2>::A<u32> {
   |  _______________________________________^
LL | |
LL | |     todo!()
LL | | }
   | |_^ private type

error: type `Priv` is private
  --> $DIR/projections.rs:24:17
   |
LL |     type A<T> = m::Leak;
   |                 ^^^^^^^ private type

error: type `Priv` is private
  --> $DIR/projections.rs:39:24
   |
LL |     type A<T: Trait> = T::A<m::Leak>;
   |                        ^^^^^^^^^^^^^ private type

error: aborting due to 6 previous errors; 1 warning emitted

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