2018-01-15 07:18:06 -06:00
|
|
|
error[E0423]: expected value, found enum `n::Z`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:23:9
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | n::Z;
|
2020-10-12 10:43:49 -05:00
|
|
|
| ^^^^
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2020-10-12 10:43:49 -05:00
|
|
|
note: the enum is defined here
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
|
|
|
|
|
|
|
|
LL | / pub(in m) enum Z {
|
|
|
|
LL | | Fn(u8),
|
|
|
|
LL | | Struct {
|
|
|
|
LL | | s: u8,
|
|
|
|
LL | | },
|
|
|
|
LL | | Unit,
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
help: you might have meant to use the following enum variant
|
|
|
|
|
|
|
|
|
LL | m::Z::Unit;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~
|
2022-10-25 11:15:15 -05:00
|
|
|
help: alternatively, the following enum variant is available
|
2020-10-12 10:43:49 -05:00
|
|
|
|
|
|
|
|
LL | (m::Z::Fn(/* fields */));
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0423]: expected value, found enum `Z`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:25:9
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | Z;
|
2020-10-12 10:43:49 -05:00
|
|
|
| ^
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2020-10-12 10:43:49 -05:00
|
|
|
note: the enum is defined here
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
|
|
|
|
|
|
|
|
LL | / pub(in m) enum Z {
|
|
|
|
LL | | Fn(u8),
|
|
|
|
LL | | Struct {
|
|
|
|
LL | | s: u8,
|
|
|
|
LL | | },
|
|
|
|
LL | | Unit,
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
help: you might have meant to use the following enum variant
|
|
|
|
|
|
|
|
|
LL | m::Z::Unit;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~
|
2022-10-25 11:15:15 -05:00
|
|
|
help: alternatively, the following enum variant is available
|
2020-10-12 10:43:49 -05:00
|
|
|
|
|
|
|
|
LL | (m::Z::Fn(/* fields */));
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0423]: expected value, found enum `m::E`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:41:16
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | fn f() {
|
|
|
|
| ------ similarly named function `f` defined here
|
2019-10-14 19:20:50 -05:00
|
|
|
...
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | let _: E = m::E;
|
|
|
|
| ^^^^
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2020-10-12 10:43:49 -05:00
|
|
|
note: the enum is defined here
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:2:5
|
|
|
|
|
|
|
|
|
LL | / pub enum E {
|
|
|
|
LL | | Fn(u8),
|
|
|
|
LL | | Struct {
|
|
|
|
LL | | s: u8,
|
|
|
|
LL | | },
|
|
|
|
LL | | Unit,
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
help: you might have meant to use the following enum variant
|
2019-03-20 13:54:43 -05:00
|
|
|
|
|
|
|
|
LL | let _: E = E::Unit;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~
|
2022-10-25 11:15:15 -05:00
|
|
|
help: alternatively, the following enum variant is available
|
2020-10-12 10:43:49 -05:00
|
|
|
|
|
|
|
|
LL | let _: E = (E::Fn(/* fields */));
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~
|
2020-08-09 22:29:39 -05:00
|
|
|
help: a function with a similar name exists
|
|
|
|
|
|
|
|
|
LL | let _: E = m::f;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~
|
2022-05-02 21:07:47 -05:00
|
|
|
help: consider importing one of these items instead
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-24 17:01:39 -06:00
|
|
|
LL | use std::f32::consts::E;
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-24 17:01:39 -06:00
|
|
|
LL | use std::f64::consts::E;
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2022-05-02 21:07:47 -05:00
|
|
|
help: if you import `E`, refer to it directly
|
2022-04-23 18:41:36 -05:00
|
|
|
|
|
|
|
|
LL - let _: E = m::E;
|
|
|
|
LL + let _: E = E;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0423]: expected value, found enum `E`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:49:16
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: E = E;
|
2018-01-15 07:18:06 -06:00
|
|
|
| ^
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2020-10-12 10:43:49 -05:00
|
|
|
note: the enum is defined here
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:2:5
|
|
|
|
|
|
|
|
|
LL | / pub enum E {
|
|
|
|
LL | | Fn(u8),
|
|
|
|
LL | | Struct {
|
|
|
|
LL | | s: u8,
|
|
|
|
LL | | },
|
|
|
|
LL | | Unit,
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
help: you might have meant to use the following enum variant
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2019-03-20 13:54:43 -05:00
|
|
|
LL | let _: E = E::Unit;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~
|
2022-10-25 11:15:15 -05:00
|
|
|
help: alternatively, the following enum variant is available
|
2020-10-12 10:43:49 -05:00
|
|
|
|
|
|
|
|
LL | let _: E = (E::Fn(/* fields */));
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~
|
2020-05-04 17:12:06 -05:00
|
|
|
help: consider importing one of these items instead
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-24 17:01:39 -06:00
|
|
|
LL | use std::f32::consts::E;
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-24 17:01:39 -06:00
|
|
|
LL | use std::f64::consts::E;
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
error[E0412]: cannot find type `Z` in this scope
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:57:12
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | pub enum E {
|
|
|
|
| ---------- similarly named enum `E` defined here
|
2019-10-14 19:20:50 -05:00
|
|
|
...
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | let _: Z = m::n::Z;
|
2021-09-10 18:15:40 -05:00
|
|
|
| ^ help: an enum with a similar name exists: `E`
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2021-09-17 17:07:41 -05:00
|
|
|
note: enum `m::Z` exists but is inaccessible
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
|
|
|
|
|
|
|
|
LL | pub(in m) enum Z {
|
|
|
|
| ^^^^^^^^^^^^^^^^ not accessible
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0423]: expected value, found enum `m::n::Z`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:57:16
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: Z = m::n::Z;
|
2020-10-12 10:43:49 -05:00
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
note: the enum is defined here
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
2019-03-20 13:54:43 -05:00
|
|
|
|
|
2020-10-12 10:43:49 -05:00
|
|
|
LL | / pub(in m) enum Z {
|
|
|
|
LL | | Fn(u8),
|
|
|
|
LL | | Struct {
|
|
|
|
LL | | s: u8,
|
|
|
|
LL | | },
|
|
|
|
LL | | Unit,
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
help: you might have meant to use the following enum variant
|
|
|
|
|
|
|
|
|
LL | let _: Z = m::Z::Unit;
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~
|
2022-10-25 11:15:15 -05:00
|
|
|
help: alternatively, the following enum variant is available
|
2020-10-12 10:43:49 -05:00
|
|
|
|
|
|
|
|
LL | let _: Z = (m::Z::Fn(/* fields */));
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0412]: cannot find type `Z` in this scope
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:61:12
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | pub enum E {
|
|
|
|
| ---------- similarly named enum `E` defined here
|
2019-10-14 19:20:50 -05:00
|
|
|
...
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | let _: Z = m::n::Z::Fn;
|
2021-09-10 18:15:40 -05:00
|
|
|
| ^ help: an enum with a similar name exists: `E`
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2021-09-17 17:07:41 -05:00
|
|
|
note: enum `m::Z` exists but is inaccessible
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
|
|
|
|
|
|
|
|
LL | pub(in m) enum Z {
|
|
|
|
| ^^^^^^^^^^^^^^^^ not accessible
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0412]: cannot find type `Z` in this scope
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:64:12
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | pub enum E {
|
|
|
|
| ---------- similarly named enum `E` defined here
|
2019-10-14 19:20:50 -05:00
|
|
|
...
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | let _: Z = m::n::Z::Struct;
|
2021-09-10 18:15:40 -05:00
|
|
|
| ^ help: an enum with a similar name exists: `E`
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2021-09-17 17:07:41 -05:00
|
|
|
note: enum `m::Z` exists but is inaccessible
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
|
|
|
|
|
|
|
|
LL | pub(in m) enum Z {
|
|
|
|
| ^^^^^^^^^^^^^^^^ not accessible
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0412]: cannot find type `Z` in this scope
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:68:12
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | pub enum E {
|
|
|
|
| ---------- similarly named enum `E` defined here
|
2019-10-14 19:20:50 -05:00
|
|
|
...
|
2020-03-21 09:03:58 -05:00
|
|
|
LL | let _: Z = m::n::Z::Unit {};
|
2021-09-10 18:15:40 -05:00
|
|
|
| ^ help: an enum with a similar name exists: `E`
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2021-09-17 17:07:41 -05:00
|
|
|
note: enum `m::Z` exists but is inaccessible
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
|
|
|
|
|
|
|
|
LL | pub(in m) enum Z {
|
|
|
|
| ^^^^^^^^^^^^^^^^ not accessible
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0603]: enum `Z` is private
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:57:22
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: Z = m::n::Z;
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^ private enum
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the enum `Z` is defined here
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
|
|
|
|
|
|
|
|
LL | pub(in m) enum Z {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0603]: enum `Z` is private
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:61:22
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: Z = m::n::Z::Fn;
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^ private enum
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the enum `Z` is defined here
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
|
|
|
|
|
|
|
|
LL | pub(in m) enum Z {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0603]: enum `Z` is private
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:64:22
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: Z = m::n::Z::Struct;
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^ private enum
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the enum `Z` is defined here
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
|
|
|
|
|
|
|
|
LL | pub(in m) enum Z {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0603]: enum `Z` is private
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:68:22
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: Z = m::n::Z::Unit {};
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^ private enum
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the enum `Z` is defined here
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:11:9
|
|
|
|
|
|
|
|
|
LL | pub(in m) enum Z {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:27:20
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2019-08-07 00:29:10 -05:00
|
|
|
LL | Fn(u8),
|
2023-01-05 21:33:57 -06:00
|
|
|
| -- `Fn` defines an enum variant constructor here, which should be called
|
2019-08-07 00:29:10 -05:00
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: Z = Z::Fn;
|
2023-01-02 20:00:33 -06:00
|
|
|
| - ^^^^^ expected `Z`, found enum constructor
|
2020-03-11 22:38:21 -05:00
|
|
|
| |
|
2019-11-18 23:00:24 -06:00
|
|
|
| expected due to this
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2023-01-05 21:09:14 -06:00
|
|
|
= note: expected enum `Z`
|
|
|
|
found enum constructor `fn(u8) -> Z {Z::Fn}`
|
2022-10-18 21:53:47 -05:00
|
|
|
help: use parentheses to construct this tuple variant
|
2020-03-11 22:38:21 -05:00
|
|
|
|
|
2022-08-27 20:22:51 -05:00
|
|
|
LL | let _: Z = Z::Fn(/* u8 */);
|
|
|
|
| ++++++++++
|
2018-01-15 07:18:06 -06:00
|
|
|
|
2022-10-25 11:15:15 -05:00
|
|
|
error[E0533]: expected value, found struct variant `Z::Struct`
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:29:20
|
|
|
|
|
|
|
|
|
LL | let _: Z = Z::Struct;
|
|
|
|
| ^^^^^^^^^ not a value
|
|
|
|
|
2018-01-15 07:18:06 -06:00
|
|
|
error[E0618]: expected function, found enum variant `Z::Unit`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:31:17
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | Unit,
|
2022-07-16 17:15:41 -05:00
|
|
|
| ---- enum variant `Z::Unit` defined here
|
2018-01-15 07:18:06 -06:00
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _ = Z::Unit();
|
2018-11-10 22:46:05 -06:00
|
|
|
| ^^^^^^^--
|
|
|
|
| |
|
|
|
|
| call expression requires function
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2022-07-16 17:15:41 -05:00
|
|
|
help: `Z::Unit` is a unit enum variant, and does not take parentheses to be constructed
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2021-11-16 14:35:26 -06:00
|
|
|
LL - let _ = Z::Unit();
|
|
|
|
LL + let _ = Z::Unit;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:43:16
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2019-08-07 00:29:10 -05:00
|
|
|
LL | Fn(u8),
|
2023-01-05 21:33:57 -06:00
|
|
|
| -- `Fn` defines an enum variant constructor here, which should be called
|
2019-08-07 00:29:10 -05:00
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: E = m::E::Fn;
|
2023-01-02 20:00:33 -06:00
|
|
|
| - ^^^^^^^^ expected `E`, found enum constructor
|
2020-03-11 22:38:21 -05:00
|
|
|
| |
|
2019-11-18 23:00:24 -06:00
|
|
|
| expected due to this
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2023-01-05 21:09:14 -06:00
|
|
|
= note: expected enum `E`
|
|
|
|
found enum constructor `fn(u8) -> E {E::Fn}`
|
2022-10-18 21:53:47 -05:00
|
|
|
help: use parentheses to construct this tuple variant
|
2020-03-11 22:38:21 -05:00
|
|
|
|
|
2022-08-27 20:22:51 -05:00
|
|
|
LL | let _: E = m::E::Fn(/* u8 */);
|
|
|
|
| ++++++++++
|
2018-01-15 07:18:06 -06:00
|
|
|
|
2022-10-25 11:15:15 -05:00
|
|
|
error[E0533]: expected value, found struct variant `m::E::Struct`
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:45:16
|
|
|
|
|
|
|
|
|
LL | let _: E = m::E::Struct;
|
|
|
|
| ^^^^^^^^^^^^ not a value
|
|
|
|
|
2018-01-15 07:18:06 -06:00
|
|
|
error[E0618]: expected function, found enum variant `m::E::Unit`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:47:16
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | Unit,
|
2022-07-16 17:15:41 -05:00
|
|
|
| ---- enum variant `m::E::Unit` defined here
|
2018-01-15 07:18:06 -06:00
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: E = m::E::Unit();
|
2018-11-10 22:46:05 -06:00
|
|
|
| ^^^^^^^^^^--
|
|
|
|
| |
|
|
|
|
| call expression requires function
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2022-07-16 17:15:41 -05:00
|
|
|
help: `m::E::Unit` is a unit enum variant, and does not take parentheses to be constructed
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2021-11-16 14:35:26 -06:00
|
|
|
LL - let _: E = m::E::Unit();
|
|
|
|
LL + let _: E = m::E::Unit;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:51:16
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2019-08-07 00:29:10 -05:00
|
|
|
LL | Fn(u8),
|
2023-01-05 21:33:57 -06:00
|
|
|
| -- `Fn` defines an enum variant constructor here, which should be called
|
2019-08-07 00:29:10 -05:00
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: E = E::Fn;
|
2023-01-02 20:00:33 -06:00
|
|
|
| - ^^^^^ expected `E`, found enum constructor
|
2020-03-11 22:38:21 -05:00
|
|
|
| |
|
2019-11-18 23:00:24 -06:00
|
|
|
| expected due to this
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2023-01-05 21:09:14 -06:00
|
|
|
= note: expected enum `E`
|
|
|
|
found enum constructor `fn(u8) -> E {E::Fn}`
|
2022-10-18 21:53:47 -05:00
|
|
|
help: use parentheses to construct this tuple variant
|
2020-03-11 22:38:21 -05:00
|
|
|
|
|
2022-08-27 20:22:51 -05:00
|
|
|
LL | let _: E = E::Fn(/* u8 */);
|
|
|
|
| ++++++++++
|
2018-01-15 07:18:06 -06:00
|
|
|
|
2022-10-25 11:15:15 -05:00
|
|
|
error[E0533]: expected value, found struct variant `E::Struct`
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:53:16
|
|
|
|
|
|
|
|
|
LL | let _: E = E::Struct;
|
|
|
|
| ^^^^^^^^^ not a value
|
|
|
|
|
2018-01-15 07:18:06 -06:00
|
|
|
error[E0618]: expected function, found enum variant `E::Unit`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/privacy-enum-ctor.rs:55:16
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | Unit,
|
2022-07-16 17:15:41 -05:00
|
|
|
| ---- enum variant `E::Unit` defined here
|
2018-01-15 07:18:06 -06:00
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | let _: E = E::Unit();
|
2018-11-10 22:46:05 -06:00
|
|
|
| ^^^^^^^--
|
|
|
|
| |
|
|
|
|
| call expression requires function
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2022-07-16 17:15:41 -05:00
|
|
|
help: `E::Unit` is a unit enum variant, and does not take parentheses to be constructed
|
2018-01-15 07:18:06 -06:00
|
|
|
|
|
2021-11-16 14:35:26 -06:00
|
|
|
LL - let _: E = E::Unit();
|
|
|
|
LL + let _: E = E::Unit;
|
2022-06-08 12:34:57 -05:00
|
|
|
|
|
2018-01-15 07:18:06 -06:00
|
|
|
|
2022-10-25 11:15:15 -05:00
|
|
|
error[E0533]: expected value, found struct variant `m::n::Z::Struct`
|
|
|
|
--> $DIR/privacy-enum-ctor.rs:64:16
|
|
|
|
|
|
|
|
|
LL | let _: Z = m::n::Z::Struct;
|
|
|
|
| ^^^^^^^^^^^^^^^ not a value
|
|
|
|
|
2018-01-15 07:18:06 -06:00
|
|
|
error: aborting due to 23 previous errors
|
|
|
|
|
2022-10-25 11:15:15 -05:00
|
|
|
Some errors have detailed explanations: E0308, E0412, E0423, E0533, E0603, E0618.
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about an error, try `rustc --explain E0308`.
|