File: private-in-public.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (39 lines) | stat: -rw-r--r-- 1,312 bytes parent folder | download | duplicates (6)
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
warning: associated type `PubTy::PrivAssocTy` is more private than the item `PubAlias0`
  --> $DIR/private-in-public.rs:7:1
   |
LL | pub type PubAlias0 = PubTy::PrivAssocTy;
   | ^^^^^^^^^^^^^^^^^^ type alias `PubAlias0` is reachable at visibility `pub`
   |
note: but associated type `PubTy::PrivAssocTy` is only usable at visibility `pub(crate)`
  --> $DIR/private-in-public.rs:16:5
   |
LL |     type PrivAssocTy = ();
   |     ^^^^^^^^^^^^^^^^
   = note: `#[warn(private_interfaces)]` on by default

warning: type `PrivTy` is more private than the item `PubAlias1`
  --> $DIR/private-in-public.rs:9:1
   |
LL | pub type PubAlias1 = PrivTy::PubAssocTy;
   | ^^^^^^^^^^^^^^^^^^ type alias `PubAlias1` is reachable at visibility `pub`
   |
note: but type `PrivTy` is only usable at visibility `pub(crate)`
  --> $DIR/private-in-public.rs:20:1
   |
LL | struct PrivTy;
   | ^^^^^^^^^^^^^

warning: type `PrivTy` is more private than the item `PubAlias2`
  --> $DIR/private-in-public.rs:11:1
   |
LL | pub type PubAlias2 = PubTy::PubAssocTy<PrivTy>;
   | ^^^^^^^^^^^^^^^^^^ type alias `PubAlias2` is reachable at visibility `pub`
   |
note: but type `PrivTy` is only usable at visibility `pub(crate)`
  --> $DIR/private-in-public.rs:20:1
   |
LL | struct PrivTy;
   | ^^^^^^^^^^^^^

warning: 3 warnings emitted