2023-06-19 09:06:00 -05:00
|
|
|
error: type `types::Priv` is more private than the item `types::Alias`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/private-in-public-warn.rs:15:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub type Alias = Priv;
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^ type alias `types::Alias` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but type `types::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:9:5
|
|
|
|
|
|
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2020-01-22 17:57:38 -06:00
|
|
|
note: the lint level is defined here
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/private-in-public-warn.rs:5:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | #![deny(private_interfaces, private_bounds)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `types::Priv` is more private than the item `E::V1::0`
|
|
|
|
--> $DIR/private-in-public-warn.rs:17:12
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | V1(Priv),
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^ field `E::V1::0` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but type `types::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:9:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `types::Priv` is more private than the item `E::V2::field`
|
|
|
|
--> $DIR/private-in-public-warn.rs:18:14
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | V2 { field: Priv },
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^ field `E::V2::field` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but type `types::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:9:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `types::Priv` is more private than the item `Tr::C`
|
|
|
|
--> $DIR/private-in-public-warn.rs:21:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | const C: Priv = Priv;
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^ associated constant `Tr::C` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but type `types::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:9:5
|
|
|
|
|
|
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0446]: private type `types::Priv` in public interface
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-warn.rs:22:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ----------- `types::Priv` declared as private
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | type Alias = Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^ can't leak private type
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `types::Priv` is more private than the item `Tr::f1`
|
|
|
|
--> $DIR/private-in-public-warn.rs:23:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | fn f1(arg: Priv) {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ associated function `Tr::f1` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but type `types::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:9:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `types::Priv` is more private than the item `Tr::f2`
|
|
|
|
--> $DIR/private-in-public-warn.rs:24:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | fn f2() -> Priv { panic!() }
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^ associated function `Tr::f2` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but type `types::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:9:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `types::Priv` is more private than the item `types::ES`
|
|
|
|
--> $DIR/private-in-public-warn.rs:27:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub static ES: Priv;
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ static `types::ES` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but type `types::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:9:5
|
|
|
|
|
|
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `types::Priv` is more private than the item `types::ef1`
|
|
|
|
--> $DIR/private-in-public-warn.rs:28:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub fn ef1(arg: Priv);
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ function `types::ef1` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but type `types::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:9:5
|
|
|
|
|
|
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `types::Priv` is more private than the item `types::ef2`
|
|
|
|
--> $DIR/private-in-public-warn.rs:29:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub fn ef2() -> Priv;
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ function `types::ef2` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but type `types::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:9:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0446]: private type `types::Priv` in public interface
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-warn.rs:32:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ----------- `types::Priv` declared as private
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | type Alias = Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^ can't leak private type
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `traits::PrivTr` is more private than the item `traits::Alias`
|
|
|
|
--> $DIR/private-in-public-warn.rs:41:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub type Alias<T: PrivTr> = T;
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ type alias `traits::Alias` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but trait `traits::PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:37:5
|
|
|
|
|
|
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/private-in-public-warn.rs:5:29
|
|
|
|
|
|
|
|
|
LL | #![deny(private_interfaces, private_bounds)]
|
|
|
|
| ^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `traits::PrivTr` is more private than the item `traits::Tr1`
|
|
|
|
--> $DIR/private-in-public-warn.rs:43:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub trait Tr1: PrivTr {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ trait `traits::Tr1` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but trait `traits::PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:37:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `traits::PrivTr` is more private than the item `traits::Tr2`
|
|
|
|
--> $DIR/private-in-public-warn.rs:44:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub trait Tr2<T: PrivTr> {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ trait `traits::Tr2` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but trait `traits::PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:37:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `traits::PrivTr` is more private than the item `traits::Tr3::Alias`
|
|
|
|
--> $DIR/private-in-public-warn.rs:46:9
|
2020-06-27 15:36:35 -05:00
|
|
|
|
|
|
|
|
LL | type Alias: PrivTr;
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^ associated type `traits::Tr3::Alias` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but trait `traits::PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:37:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `traits::PrivTr` is more private than the item `traits::Tr3::f`
|
|
|
|
--> $DIR/private-in-public-warn.rs:48:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | fn f<T: PrivTr>(arg: T) {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ associated function `traits::Tr3::f` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but trait `traits::PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:37:5
|
|
|
|
|
|
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `traits::PrivTr` is more private than the item `traits::Pub<T>`
|
|
|
|
--> $DIR/private-in-public-warn.rs:50:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | impl<T: PrivTr> Pub<T> {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ implementation `traits::Pub<T>` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but trait `traits::PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:37:5
|
|
|
|
|
|
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `traits_where::PrivTr` is more private than the item `traits_where::Alias`
|
|
|
|
--> $DIR/private-in-public-warn.rs:59:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | pub type Alias<T> where T: PrivTr = T;
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^ type alias `traits_where::Alias` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:55:5
|
|
|
|
|
|
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `traits_where::PrivTr` is more private than the item `traits_where::Tr2`
|
|
|
|
--> $DIR/private-in-public-warn.rs:62:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | pub trait Tr2<T> where T: PrivTr {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^ trait `traits_where::Tr2` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:55:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `traits_where::PrivTr` is more private than the item `traits_where::Tr3::f`
|
|
|
|
--> $DIR/private-in-public-warn.rs:65:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | fn f<T>(arg: T) where T: PrivTr {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function `traits_where::Tr3::f` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:55:5
|
|
|
|
|
|
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `traits_where::PrivTr` is more private than the item `traits_where::Pub<T>`
|
|
|
|
--> $DIR/private-in-public-warn.rs:68:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | impl<T> Pub<T> where T: PrivTr {}
|
2023-10-06 15:35:52 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation `traits_where::Pub<T>` is reachable at visibility `pub(crate)`
|
2023-06-19 09:06:00 -05:00
|
|
|
|
|
|
|
|
note: but trait `traits_where::PrivTr` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:55:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | trait PrivTr {}
|
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `generics::PrivTr<generics::Pub>` is more private than the item `generics::Tr1`
|
|
|
|
--> $DIR/private-in-public-warn.rs:79:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | pub trait Tr1: PrivTr<Pub> {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `generics::Tr1` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but trait `generics::PrivTr<generics::Pub>` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:76:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | trait PrivTr<T> {}
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `generics::Priv` is more private than the item `generics::Tr2`
|
|
|
|
--> $DIR/private-in-public-warn.rs:81:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub trait Tr2: PubTr<Priv> {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `generics::Tr2` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but type `generics::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:74:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | struct Priv<T = u8>(T);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `generics::Priv` is more private than the item `generics::Tr3`
|
|
|
|
--> $DIR/private-in-public-warn.rs:82:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub trait Tr3: PubTr<[Priv; 1]> {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `generics::Tr3` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but type `generics::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:74:5
|
|
|
|
|
|
|
|
|
LL | struct Priv<T = u8>(T);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `generics::Priv` is more private than the item `Tr4`
|
|
|
|
--> $DIR/private-in-public-warn.rs:83:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub trait Tr4: PubTr<Pub<Priv>> {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `Tr4` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but type `generics::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:74:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | struct Priv<T = u8>(T);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0446]: private type `impls::Priv` in public interface
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-warn.rs:109:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ----------- `impls::Priv` declared as private
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | type Alias = Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^ can't leak private type
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `aliases_pub::Priv` is more private than the item `aliases_pub::<impl Pub2>::f`
|
|
|
|
--> $DIR/private-in-public-warn.rs:180:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub fn f(arg: Priv) {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ associated function `aliases_pub::<impl Pub2>::f` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but type `aliases_pub::Priv` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:153:5
|
|
|
|
|
|
|
|
|
LL | struct Priv;
|
|
|
|
| ^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0446]: private type `aliases_pub::Priv` in public interface
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-warn.rs:183:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ----------- `aliases_pub::Priv` declared as private
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | type Check = Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^ can't leak private type
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0446]: private type `aliases_pub::Priv` in public interface
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-warn.rs:186:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ----------- `aliases_pub::Priv` declared as private
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | type Check = Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^ can't leak private type
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0446]: private type `aliases_pub::Priv` in public interface
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-warn.rs:189:9
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | struct Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ----------- `aliases_pub::Priv` declared as private
|
2018-08-08 07:28:26 -05:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | type Check = Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^ can't leak private type
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2018-12-16 07:18:45 -06:00
|
|
|
error[E0446]: private type `aliases_pub::Priv` in public interface
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-warn.rs:192:9
|
2018-12-16 07:18:45 -06:00
|
|
|
|
|
|
|
|
LL | struct Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ----------- `aliases_pub::Priv` declared as private
|
2018-12-16 07:18:45 -06:00
|
|
|
...
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | type Check = Priv;
|
2022-02-13 09:27:59 -06:00
|
|
|
| ^^^^^^^^^^ can't leak private type
|
2018-12-16 07:18:45 -06:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `PrivTr1` is more private than the item `aliases_priv::Tr1`
|
|
|
|
--> $DIR/private-in-public-warn.rs:222:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | pub trait Tr1: PrivUseAliasTr {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `aliases_priv::Tr1` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but trait `PrivTr1` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:208:5
|
|
|
|
|
|
|
|
|
LL | trait PrivTr1<T = u8> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: trait `PrivTr1<Priv2>` is more private than the item `aliases_priv::Tr2`
|
|
|
|
--> $DIR/private-in-public-warn.rs:224:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `aliases_priv::Tr2` is reachable at visibility `pub(crate)`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
note: but trait `PrivTr1<Priv2>` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:208:5
|
|
|
|
|
|
|
|
|
LL | trait PrivTr1<T = u8> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
error: type `Priv2` is more private than the item `aliases_priv::Tr2`
|
|
|
|
--> $DIR/private-in-public-warn.rs:224:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | pub trait Tr2: PrivUseAliasTr<PrivAlias> {}
|
2023-06-19 09:06:00 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trait `aliases_priv::Tr2` is reachable at visibility `pub(crate)`
|
|
|
|
|
|
|
|
|
note: but type `Priv2` is only usable at visibility `pub(self)`
|
|
|
|
--> $DIR/private-in-public-warn.rs:206:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2023-06-19 09:06:00 -05:00
|
|
|
LL | struct Priv2;
|
|
|
|
| ^^^^^^^^^^^^
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-01-29 09:47:30 -06:00
|
|
|
warning: bounds on generic parameters are not enforced in type aliases
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-warn.rs:41:23
|
2019-01-29 09:47:30 -06:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | pub type Alias<T: PrivTr> = T;
|
2019-01-29 09:47:30 -06:00
|
|
|
| ^^^^^^
|
|
|
|
|
|
2019-07-16 15:17:38 -05:00
|
|
|
= note: `#[warn(type_alias_bounds)]` on by default
|
2019-10-28 18:58:27 -05:00
|
|
|
help: the bound will not be checked when the type alias is used, and should be removed
|
|
|
|
|
|
2021-06-21 21:07:19 -05:00
|
|
|
LL - pub type Alias<T: PrivTr> = T;
|
|
|
|
LL + pub type Alias<T> = T;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2019-01-29 09:47:30 -06:00
|
|
|
|
|
|
|
warning: where clauses are not enforced in type aliases
|
2023-06-19 09:06:00 -05:00
|
|
|
--> $DIR/private-in-public-warn.rs:59:29
|
2019-01-29 09:47:30 -06:00
|
|
|
|
|
|
|
|
LL | pub type Alias<T> where T: PrivTr = T;
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2019-10-28 18:58:27 -05:00
|
|
|
help: the clause will not be checked when the type alias is used, and should be removed
|
|
|
|
|
|
2021-06-21 21:07:19 -05:00
|
|
|
LL - pub type Alias<T> where T: PrivTr = T;
|
|
|
|
LL + pub type Alias<T> = T;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2019-01-29 09:47:30 -06:00
|
|
|
|
2021-11-04 11:31:18 -05:00
|
|
|
error: aborting due to 34 previous errors; 2 warnings emitted
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0446`.
|