diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/error-codes/E0023.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/error-codes/E0023.stderr')
-rw-r--r-- | src/test/ui/error-codes/E0023.stderr | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0023.stderr b/src/test/ui/error-codes/E0023.stderr new file mode 100644 index 000000000..3e321b037 --- /dev/null +++ b/src/test/ui/error-codes/E0023.stderr @@ -0,0 +1,63 @@ +error[E0023]: this pattern has 1 field, but the corresponding tuple variant has 2 fields + --> $DIR/E0023.rs:11:22 + | +LL | Apple(String, String), + | ------ ------ tuple variant has 2 fields +... +LL | Fruit::Apple(a) => {}, + | ^ expected 2 fields, found 1 + | +help: use `_` to explicitly ignore each field + | +LL | Fruit::Apple(a, _) => {}, + | +++ + +error[E0023]: this pattern has 3 fields, but the corresponding tuple variant has 2 fields + --> $DIR/E0023.rs:12:22 + | +LL | Apple(String, String), + | ------ ------ tuple variant has 2 fields +... +LL | Fruit::Apple(a, b, c) => {}, + | ^ ^ ^ expected 2 fields, found 3 + +error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field + --> $DIR/E0023.rs:13:21 + | +LL | Pear(u32), + | --- tuple variant has 1 field +... +LL | Fruit::Pear(1, 2) => {}, + | ^ ^ expected 1 field, found 2 + +error[E0023]: this pattern has 2 fields, but the corresponding tuple variant has 1 field + --> $DIR/E0023.rs:14:23 + | +LL | Orange((String, String)), + | ---------------- tuple variant has 1 field +... +LL | Fruit::Orange(a, b) => {}, + | ^ ^ expected 1 field, found 2 + | +help: missing parentheses + | +LL | Fruit::Orange((a, b)) => {}, + | + + + +error[E0023]: this pattern has 0 fields, but the corresponding tuple variant has 1 field + --> $DIR/E0023.rs:15:9 + | +LL | Banana(()), + | -- tuple variant has 1 field +... +LL | Fruit::Banana() => {}, + | ^^^^^^^^^^^^^^^ expected 1 field, found 0 + | +help: missing parentheses + | +LL | Fruit::Banana(()) => {}, + | + + + +error: aborting due to 5 previous errors + +For more information about this error, try `rustc --explain E0023`. |