2021-09-10 15:45:04 -05:00
|
|
|
warning: some fields are not explicitly listed
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:139:9
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
|
LL | VariantNonExhaustive::Bar { x, .. } => {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `y` not listed
|
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
|
|
|
= note: the pattern is of type `VariantNonExhaustive` and the `non_exhaustive_omitted_patterns` attribute was found
|
2021-09-10 15:45:04 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:136:12
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
|
LL | #[warn(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
warning: some fields are not explicitly listed
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:144:9
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
|
LL | let FunctionalRecord { first_field, second_field, .. } = FunctionalRecord::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `third_field` not listed
|
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
|
|
|
= note: the pattern is of type `FunctionalRecord` and the `non_exhaustive_omitted_patterns` attribute was found
|
2021-09-10 15:45:04 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:143:12
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
|
LL | #[warn(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
warning: some fields are not explicitly listed
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:152:29
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
|
LL | let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = NestedStruct::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `second_field` not listed
|
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
|
|
|
= note: the pattern is of type `NormalStruct` and the `non_exhaustive_omitted_patterns` attribute was found
|
2021-09-10 15:45:04 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:151:12
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
|
LL | #[warn(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
warning: some fields are not explicitly listed
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:152:9
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
|
LL | let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = NestedStruct::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `foo` not listed
|
|
|
|
|
|
|
|
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
|
|
|
= note: the pattern is of type `NestedStruct` and the `non_exhaustive_omitted_patterns` attribute was found
|
|
|
|
|
2021-10-27 19:30:26 -05:00
|
|
|
warning: some fields are not explicitly listed
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:216:9
|
2021-10-27 19:30:26 -05:00
|
|
|
|
|
|
|
|
LL | let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable2` not listed
|
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
|
|
|
= note: the pattern is of type `OnlyUnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
|
2021-10-27 19:30:26 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:215:12
|
2021-10-27 19:30:26 -05:00
|
|
|
|
|
|
|
|
LL | #[warn(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
warning: some fields are not explicitly listed
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:224:9
|
2021-10-27 19:30:26 -05:00
|
|
|
|
|
|
|
|
LL | let UnstableStruct { stable, stable2, .. } = UnstableStruct::default();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable` not listed
|
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: ensure that all fields are mentioned explicitly by adding the suggested fields
|
|
|
|
= note: the pattern is of type `UnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
|
2021-10-27 19:30:26 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:223:12
|
2021-10-27 19:30:26 -05:00
|
|
|
|
|
|
|
|
LL | #[warn(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2021-09-10 15:45:04 -05:00
|
|
|
error: some variants are not matched explicitly
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:55:11
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
2023-10-14 11:25:10 -05:00
|
|
|
LL | match non_enum {
|
|
|
|
| ^^^^^^^^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
|
|
|
= note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
2021-09-10 15:45:04 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 08:19:51 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:54:12
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
2023-10-14 08:19:51 -05:00
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
error: some variants are not matched explicitly
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:63:11
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
2023-10-14 11:25:10 -05:00
|
|
|
LL | match non_enum {
|
|
|
|
| ^^^^^^^^ pattern `NonExhaustiveEnum::Tuple(_)` not covered
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
|
|
|
= note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
2021-09-10 15:45:04 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 08:19:51 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:62:12
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
2023-10-14 08:19:51 -05:00
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
error: some variants are not matched explicitly
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:87:11
|
2023-10-14 08:19:51 -05:00
|
|
|
|
|
2023-10-14 11:25:10 -05:00
|
|
|
LL | match (non_enum, true) {
|
|
|
|
| ^^^^^^^^^^^^^^^^ pattern `(NonExhaustiveEnum::Struct { .. }, _)` not covered
|
2023-10-14 08:19:51 -05:00
|
|
|
|
|
|
|
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
2023-10-14 11:25:10 -05:00
|
|
|
= note: the matched value is of type `(NonExhaustiveEnum, bool)` and the `non_exhaustive_omitted_patterns` attribute was found
|
2023-10-14 08:19:51 -05:00
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/omitted-patterns.rs:86:12
|
|
|
|
|
|
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: some variants are not matched explicitly
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:102:11
|
2023-10-14 08:19:51 -05:00
|
|
|
|
|
2023-10-14 11:25:10 -05:00
|
|
|
LL | match (true, non_enum) {
|
|
|
|
| ^^^^^^^^^^^^^^^^ pattern `(_, NonExhaustiveEnum::Struct { .. })` not covered
|
2023-10-14 08:19:51 -05:00
|
|
|
|
|
|
|
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
2023-10-14 11:25:10 -05:00
|
|
|
= note: the matched value is of type `(bool, NonExhaustiveEnum)` and the `non_exhaustive_omitted_patterns` attribute was found
|
2023-10-14 08:19:51 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:101:12
|
2023-10-14 08:19:51 -05:00
|
|
|
|
|
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: some variants are not matched explicitly
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:110:11
|
2023-10-14 08:19:51 -05:00
|
|
|
|
|
2023-10-14 11:25:10 -05:00
|
|
|
LL | match Some(non_enum) {
|
|
|
|
| ^^^^^^^^^^^^^^ pattern `Some(NonExhaustiveEnum::Struct { .. })` not covered
|
2023-10-14 08:19:51 -05:00
|
|
|
|
|
|
|
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
2023-10-14 11:25:10 -05:00
|
|
|
= note: the matched value is of type `Option<NonExhaustiveEnum>` and the `non_exhaustive_omitted_patterns` attribute was found
|
2023-10-14 08:19:51 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:109:12
|
2023-10-14 08:19:51 -05:00
|
|
|
|
|
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: some variants are not matched explicitly
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:128:11
|
2023-10-14 08:19:51 -05:00
|
|
|
|
|
2023-10-14 11:25:10 -05:00
|
|
|
LL | match NestedNonExhaustive::B {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^ patterns `NestedNonExhaustive::C`, `NestedNonExhaustive::A(NonExhaustiveEnum::Tuple(_))` and `NestedNonExhaustive::A(NonExhaustiveEnum::Struct { .. })` not covered
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
|
|
|
= note: the matched value is of type `NestedNonExhaustive` and the `non_exhaustive_omitted_patterns` attribute was found
|
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:127:12
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: some variants are not matched explicitly
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:184:11
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
2023-10-14 11:25:10 -05:00
|
|
|
LL | match UnstableEnum::Stable {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ pattern `UnstableEnum::Unstable` not covered
|
2021-09-18 15:52:43 -05:00
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
|
|
|
= note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
2021-09-18 15:52:43 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:183:12
|
2021-09-18 15:52:43 -05:00
|
|
|
|
|
2023-10-14 08:19:51 -05:00
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-09-18 15:52:43 -05:00
|
|
|
|
|
|
|
error: some variants are not matched explicitly
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:209:11
|
2021-09-18 15:52:43 -05:00
|
|
|
|
|
2023-10-14 11:25:10 -05:00
|
|
|
LL | match OnlyUnstableEnum::Unstable {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `OnlyUnstableEnum::Unstable2` not covered
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
2022-09-18 10:55:36 -05:00
|
|
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
|
|
|
= note: the matched value is of type `OnlyUnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
2021-09-10 15:45:04 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:208:12
|
2021-09-10 15:45:04 -05:00
|
|
|
|
|
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2023-04-01 10:49:42 -05:00
|
|
|
error[E0005]: refutable pattern in local binding
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:237:9
|
2023-04-01 10:49:42 -05:00
|
|
|
|
|
|
|
|
LL | let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit;
|
2023-04-03 11:14:27 -05:00
|
|
|
| ^^^^^^^^^^^^^^^ pattern `_` not covered
|
2023-04-01 10:49:42 -05:00
|
|
|
|
|
|
|
|
= note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
|
|
|
|
= note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
|
|
|
|
= note: the matched value is of type `NonExhaustiveEnum`
|
|
|
|
help: you might want to use `let else` to handle the variant that isn't matched
|
|
|
|
|
|
|
|
|
LL | let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit else { todo!() };
|
|
|
|
| ++++++++++++++++
|
|
|
|
|
2023-04-01 11:54:20 -05:00
|
|
|
error: some variants are not matched explicitly
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:241:11
|
2023-04-01 11:54:20 -05:00
|
|
|
|
|
2023-10-14 11:25:10 -05:00
|
|
|
LL | match &non_enum {
|
|
|
|
| ^^^^^^^^^ pattern `&NonExhaustiveEnum::Struct { .. }` not covered
|
2023-04-01 11:54:20 -05:00
|
|
|
|
|
|
|
|
= help: ensure that all variants are matched explicitly by adding the suggested match arms
|
2023-10-14 11:25:10 -05:00
|
|
|
= note: the matched value is of type `&NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
|
2023-04-01 11:54:20 -05:00
|
|
|
note: the lint level is defined here
|
2023-10-14 11:25:10 -05:00
|
|
|
--> $DIR/omitted-patterns.rs:240:12
|
2023-04-01 11:54:20 -05:00
|
|
|
|
|
|
|
|
LL | #[deny(non_exhaustive_omitted_patterns)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2023-10-14 11:25:10 -05:00
|
|
|
error: aborting due to 10 previous errors; 6 warnings emitted
|
2021-09-10 15:45:04 -05:00
|
|
|
|
2023-04-01 10:49:42 -05:00
|
|
|
For more information about this error, try `rustc --explain E0005`.
|