@@ -93,6 +93,42 @@ LL | struct Priv;
9393LL | type Alias = Priv;
9494 | ^^^^^^^^^^ can't leak private type
9595
96+ error: type `types::Priv` is more private than the item `types::ES`
97+ --> $DIR/private-in-public-warn.rs:27:9
98+ |
99+ LL | pub static ES: Priv;
100+ | ^^^^^^^^^^^^^^^^^^^ static `types::ES` is reachable at visibility `pub(crate)`
101+ |
102+ note: but type `types::Priv` is only usable at visibility `pub(self)`
103+ --> $DIR/private-in-public-warn.rs:9:5
104+ |
105+ LL | struct Priv;
106+ | ^^^^^^^^^^^
107+
108+ error: type `types::Priv` is more private than the item `types::ef1`
109+ --> $DIR/private-in-public-warn.rs:28:9
110+ |
111+ LL | pub fn ef1(arg: Priv);
112+ | ^^^^^^^^^^^^^^^^^^^^^^ function `types::ef1` is reachable at visibility `pub(crate)`
113+ |
114+ note: but type `types::Priv` is only usable at visibility `pub(self)`
115+ --> $DIR/private-in-public-warn.rs:9:5
116+ |
117+ LL | struct Priv;
118+ | ^^^^^^^^^^^
119+
120+ error: type `types::Priv` is more private than the item `types::ef2`
121+ --> $DIR/private-in-public-warn.rs:29:9
122+ |
123+ LL | pub fn ef2() -> Priv;
124+ | ^^^^^^^^^^^^^^^^^^^^^ function `types::ef2` is reachable at visibility `pub(crate)`
125+ |
126+ note: but type `types::Priv` is only usable at visibility `pub(self)`
127+ --> $DIR/private-in-public-warn.rs:9:5
128+ |
129+ LL | struct Priv;
130+ | ^^^^^^^^^^^
131+
96132error: trait `traits::PrivTr` is more private than the item `traits::Alias`
97133 --> $DIR/private-in-public-warn.rs:42:5
98134 |
@@ -359,42 +395,6 @@ note: but type `Priv2` is only usable at visibility `pub(self)`
359395LL | struct Priv2;
360396 | ^^^^^^^^^^^^
361397
362- error: type `types::Priv` is more private than the item `types::ES`
363- --> $DIR/private-in-public-warn.rs:27:9
364- |
365- LL | pub static ES: Priv;
366- | ^^^^^^^^^^^^^^^^^^^ static `types::ES` is reachable at visibility `pub(crate)`
367- |
368- note: but type `types::Priv` is only usable at visibility `pub(self)`
369- --> $DIR/private-in-public-warn.rs:9:5
370- |
371- LL | struct Priv;
372- | ^^^^^^^^^^^
373-
374- error: type `types::Priv` is more private than the item `types::ef1`
375- --> $DIR/private-in-public-warn.rs:28:9
376- |
377- LL | pub fn ef1(arg: Priv);
378- | ^^^^^^^^^^^^^^^^^^^^^^ function `types::ef1` is reachable at visibility `pub(crate)`
379- |
380- note: but type `types::Priv` is only usable at visibility `pub(self)`
381- --> $DIR/private-in-public-warn.rs:9:5
382- |
383- LL | struct Priv;
384- | ^^^^^^^^^^^
385-
386- error: type `types::Priv` is more private than the item `types::ef2`
387- --> $DIR/private-in-public-warn.rs:29:9
388- |
389- LL | pub fn ef2() -> Priv;
390- | ^^^^^^^^^^^^^^^^^^^^^ function `types::ef2` is reachable at visibility `pub(crate)`
391- |
392- note: but type `types::Priv` is only usable at visibility `pub(self)`
393- --> $DIR/private-in-public-warn.rs:9:5
394- |
395- LL | struct Priv;
396- | ^^^^^^^^^^^
397-
398398warning: bounds on generic parameters in type aliases are not enforced
399399 --> $DIR/private-in-public-warn.rs:42:23
400400 |
0 commit comments