diff options
| author | bors <bors@rust-lang.org> | 2019-12-24 03:40:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-12-24 03:40:33 +0000 |
| commit | 625375400cdd172877e81c3ce44ce68f2011af2d (patch) | |
| tree | 2c80e84603e8cc5e868fe94406e6661baca703c0 /src/test/ui/pattern | |
| parent | a4cd03dee2b57216b5c95084a0b46de130946ad7 (diff) | |
| parent | a76d67f22f08abf355a1b6abd22b8e2b7db700eb (diff) | |
| download | rust-625375400cdd172877e81c3ce44ce68f2011af2d.tar.gz rust-625375400cdd172877e81c3ce44ce68f2011af2d.zip | |
Auto merge of #67575 - Centril:rollup-feikoir, r=Centril
Rollup of 7 pull requests Successful merges: - #67337 (Ensure that evaluating or validating a constant never reads from a static) - #67543 (Add regression tests for fixed ICEs) - #67547 (Cleanup err codes) - #67551 (Add long error code explanation message for E0627) - #67561 (remove `description` from `Error` impls in docs) - #67569 (Clean up unsafety in char::encode_utf8) - #67572 (Use the chocolatey CDN directly to avoid the flaky API) Failed merges: r? @ghost
Diffstat (limited to 'src/test/ui/pattern')
| -rw-r--r-- | src/test/ui/pattern/issue-66270-pat-struct-parser-recovery.rs | 14 | ||||
| -rw-r--r-- | src/test/ui/pattern/issue-66270-pat-struct-parser-recovery.stderr | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/pattern/issue-66270-pat-struct-parser-recovery.rs b/src/test/ui/pattern/issue-66270-pat-struct-parser-recovery.rs new file mode 100644 index 00000000000..48a8e04829a --- /dev/null +++ b/src/test/ui/pattern/issue-66270-pat-struct-parser-recovery.rs @@ -0,0 +1,14 @@ +// Regression test for #66270, fixed by #66246 + +struct Bug { + incorrect_field: 0, + //~^ ERROR expected type +} + +struct Empty {} + +fn main() { + let Bug { + any_field: Empty {}, + } = Bug {}; +} diff --git a/src/test/ui/pattern/issue-66270-pat-struct-parser-recovery.stderr b/src/test/ui/pattern/issue-66270-pat-struct-parser-recovery.stderr new file mode 100644 index 00000000000..fef0f3c0e06 --- /dev/null +++ b/src/test/ui/pattern/issue-66270-pat-struct-parser-recovery.stderr @@ -0,0 +1,8 @@ +error: expected type, found `0` + --> $DIR/issue-66270-pat-struct-parser-recovery.rs:4:22 + | +LL | incorrect_field: 0, + | ^ expected type + +error: aborting due to previous error + |
