From cf94bdc0742c13e2a0cac864c478b8626b266e1b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- .../improper_ctypes/extern_crate_improper.stderr | 2 +- .../omitted-patterns.stderr | 48 +++++++++++----------- .../stable-omitted-patterns.stderr | 8 ++-- src/test/ui/rfc-2008-non-exhaustive/struct.stderr | 12 +++--- 4 files changed, 35 insertions(+), 35 deletions(-) (limited to 'src/test/ui/rfc-2008-non-exhaustive') diff --git a/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.stderr b/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.stderr index 8a18ebc16..43c8e1015 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/improper_ctypes/extern_crate_improper.stderr @@ -4,12 +4,12 @@ error: `extern` block uses type `NonExhaustiveEnum`, which is not FFI-safe LL | pub fn non_exhaustive_enum(_: NonExhaustiveEnum); | ^^^^^^^^^^^^^^^^^ not FFI-safe | + = note: this enum is non-exhaustive note: the lint level is defined here --> $DIR/extern_crate_improper.rs:2:9 | LL | #![deny(improper_ctypes)] | ^^^^^^^^^^^^^^^ - = note: this enum is non-exhaustive error: `extern` block uses type `NormalStruct`, which is not FFI-safe --> $DIR/extern_crate_improper.rs:14:44 diff --git a/src/test/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr b/src/test/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr index 4b9f8564d..996bd4a12 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/omitted-patterns.stderr @@ -4,13 +4,13 @@ warning: some fields are not explicitly listed LL | VariantNonExhaustive::Bar { x, .. } => {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `y` not listed | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:99:12 | LL | #[warn(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 warning: some fields are not explicitly listed --> $DIR/omitted-patterns.rs:107:9 @@ -18,13 +18,13 @@ warning: some fields are not explicitly listed LL | let FunctionalRecord { first_field, second_field, .. } = FunctionalRecord::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `third_field` not listed | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:106:12 | LL | #[warn(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 warning: some fields are not explicitly listed --> $DIR/omitted-patterns.rs:115:29 @@ -32,13 +32,13 @@ warning: some fields are not explicitly listed LL | let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = NestedStruct::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `second_field` not listed | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:114:12 | LL | #[warn(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 warning: some fields are not explicitly listed --> $DIR/omitted-patterns.rs:115:9 @@ -55,13 +55,13 @@ warning: some fields are not explicitly listed LL | let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable2` not listed | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:172:12 | LL | #[warn(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 warning: some fields are not explicitly listed --> $DIR/omitted-patterns.rs:181:9 @@ -69,13 +69,13 @@ warning: some fields are not explicitly listed LL | let UnstableStruct { stable, stable2, .. } = UnstableStruct::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable` not listed | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:180:12 | LL | #[warn(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 error: some variants are not matched explicitly --> $DIR/omitted-patterns.rs:58:9 @@ -83,13 +83,13 @@ error: some variants are not matched explicitly LL | _ => {} | ^ pattern `NonExhaustiveEnum::Struct { .. }` not covered | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:57:16 | LL | #[deny(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 error: some variants are not matched explicitly --> $DIR/omitted-patterns.rs:65:9 @@ -97,13 +97,13 @@ error: some variants are not matched explicitly LL | _ => {} | ^ pattern `NonExhaustiveEnum::Tuple(_)` not covered | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:64:16 | LL | #[deny(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 error: some variants are not matched explicitly --> $DIR/omitted-patterns.rs:75:9 @@ -111,13 +111,13 @@ error: some variants are not matched explicitly LL | _ => {} | ^ pattern `NonExhaustiveEnum::Unit` not covered | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:74:16 | LL | #[deny(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 error: some variants are not matched explicitly --> $DIR/omitted-patterns.rs:92:32 @@ -125,13 +125,13 @@ error: some variants are not matched explicitly LL | NestedNonExhaustive::A(_) => {} | ^ patterns `NonExhaustiveEnum::Tuple(_)` and `NonExhaustiveEnum::Struct { .. }` not covered | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:89:12 | LL | #[deny(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 error: some variants are not matched explicitly --> $DIR/omitted-patterns.rs:94:9 @@ -148,13 +148,13 @@ error: some variants are not matched explicitly LL | _ => {} | ^ pattern `NonExhaustiveSingleVariant::A(_)` not covered | + = help: ensure that all variants are matched explicitly by adding the suggested match arms + = note: the matched value is of type `NonExhaustiveSingleVariant` and the `non_exhaustive_omitted_patterns` attribute was found note: the lint level is defined here --> $DIR/omitted-patterns.rs:130:12 | LL | #[deny(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: ensure that all variants are matched explicitly by adding the suggested match arms - = note: the matched value is of type `NonExhaustiveSingleVariant` and the `non_exhaustive_omitted_patterns` attribute was found error: some variants are not matched explicitly --> $DIR/omitted-patterns.rs:144:9 @@ -162,13 +162,13 @@ error: some variants are not matched explicitly LL | _ => {} | ^ pattern `UnstableEnum::Unstable` not covered | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:143:16 | LL | #[deny(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 error: some variants are not matched explicitly --> $DIR/omitted-patterns.rs:168:9 @@ -176,13 +176,13 @@ error: some variants are not matched explicitly LL | _ => {} | ^ pattern `OnlyUnstableEnum::Unstable2` not covered | + = 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 note: the lint level is defined here --> $DIR/omitted-patterns.rs:165:12 | LL | #[deny(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 error: aborting due to 8 previous errors; 6 warnings emitted diff --git a/src/test/ui/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr b/src/test/ui/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr index 533e8abf2..f38368590 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr @@ -4,13 +4,13 @@ warning: some fields are not explicitly listed LL | let UnstableStruct { stable, .. } = UnstableStruct::default(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `stable2` not listed | + = 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 note: the lint level is defined here --> $DIR/stable-omitted-patterns.rs:38:12 | LL | #[warn(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 error: some variants are not matched explicitly --> $DIR/stable-omitted-patterns.rs:23:9 @@ -18,13 +18,13 @@ error: some variants are not matched explicitly LL | _ => {} | ^ pattern `UnstableEnum::Stable2` not covered | + = 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 note: the lint level is defined here --> $DIR/stable-omitted-patterns.rs:22:16 | LL | #[deny(non_exhaustive_omitted_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = 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 error: aborting due to previous error; 1 warning emitted diff --git a/src/test/ui/rfc-2008-non-exhaustive/struct.stderr b/src/test/ui/rfc-2008-non-exhaustive/struct.stderr index 2b34d0711..2cb9ba0d1 100644 --- a/src/test/ui/rfc-2008-non-exhaustive/struct.stderr +++ b/src/test/ui/rfc-2008-non-exhaustive/struct.stderr @@ -1,9 +1,3 @@ -error[E0423]: cannot initialize a tuple struct which contains private fields - --> $DIR/struct.rs:20:14 - | -LL | let ts = TupleStruct(640, 480); - | ^^^^^^^^^^^ - error[E0423]: expected value, found struct `UnitStruct` --> $DIR/struct.rs:29:14 | @@ -68,6 +62,12 @@ help: add `..` at the end of the field list to ignore all other fields LL | let NormalStruct { first_field, second_field , .. } = ns; | ~~~~~~ +error[E0423]: cannot initialize a tuple struct which contains private fields + --> $DIR/struct.rs:20:14 + | +LL | let ts = TupleStruct(640, 480); + | ^^^^^^^^^^^ + error[E0638]: `..` required with struct marked as non-exhaustive --> $DIR/struct.rs:26:9 | -- cgit v1.2.3