diff options
| author | bors <bors@rust-lang.org> | 2019-11-04 02:30:45 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-11-04 02:30:45 +0000 |
| commit | f49f38871389041671cc710a044e8360091840a3 (patch) | |
| tree | ad7ea355839acdbf19ec6cc9f3af8b1cb12e864e /src/test/ui/issues | |
| parent | 0d5264a03c2d873d9e23a22def748b9c6937c537 (diff) | |
| parent | 454e2aa8c99850c9393fb2314e1a71da08120063 (diff) | |
| download | rust-f49f38871389041671cc710a044e8360091840a3.tar.gz rust-f49f38871389041671cc710a044e8360091840a3.zip | |
Auto merge of #65838 - estebank:resilient-recovery, r=Centril
Reduce amount of errors given unclosed delimiter When in a file with a non-terminated item, catch the error and consume the block instead of trying to recover it on a more granular way in order to reduce the amount of unrelated errors that would be fixed after adding the missing closing brace. Also point out the possible location of the missing closing brace. Fix #63690.
Diffstat (limited to 'src/test/ui/issues')
| -rw-r--r-- | src/test/ui/issues/issue-60075.rs | 5 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-60075.stderr | 14 |
2 files changed, 3 insertions, 16 deletions
diff --git a/src/test/ui/issues/issue-60075.rs b/src/test/ui/issues/issue-60075.rs index 5788716a526..1f53a927932 100644 --- a/src/test/ui/issues/issue-60075.rs +++ b/src/test/ui/issues/issue-60075.rs @@ -5,8 +5,7 @@ trait T { let _ = if true { }); //~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `;` -//~^^ ERROR expected one of `.`, `;`, `?`, `else`, or an operator, found `}` -//~^^^ ERROR 6:11: 6:12: expected identifier, found `;` -//~^^^^ ERROR missing `fn`, `type`, or `const` for trait-item declaration +//~| ERROR expected one of `.`, `;`, `?`, `else`, or an operator, found `}` +//~| ERROR expected identifier, found `;` Some(4) } diff --git a/src/test/ui/issues/issue-60075.stderr b/src/test/ui/issues/issue-60075.stderr index ac97d32a6e1..961a546d8d6 100644 --- a/src/test/ui/issues/issue-60075.stderr +++ b/src/test/ui/issues/issue-60075.stderr @@ -19,17 +19,5 @@ error: expected identifier, found `;` LL | }); | ^ expected identifier -error: missing `fn`, `type`, or `const` for trait-item declaration - --> $DIR/issue-60075.rs:6:12 - | -LL | }); - | ____________^ -LL | | -LL | | -LL | | -LL | | -LL | | Some(4) - | |________^ missing `fn`, `type`, or `const` - -error: aborting due to 4 previous errors +error: aborting due to 3 previous errors |
