diff options
| author | bors <bors@rust-lang.org> | 2020-09-02 19:29:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-02 19:29:27 +0000 |
| commit | 80fc9b0ecb29050d45b17c64af004200afd3cfc2 (patch) | |
| tree | 3d0269d8f9ecb027bd59a942462003ed9e01e4ea /src/tools | |
| parent | a167485e279be8a11c9c09d0dddaf1d7c5724f1c (diff) | |
| parent | 3524c3ef4371d0bf4dd03568a004039f18c154f7 (diff) | |
Auto merge of #76160 - scileo:format-recovery, r=petrochenkov
Improve recovery on malformed format call The token following a format expression should be a comma. However, when it is replaced with a similar token (such as a dot), then the corresponding error is emitted, but the token is treated as a comma, and the parsing step continues. r? @petrochenkov
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/clippy/tests/ui/issue-3145.rs | 2 | ||||
| -rw-r--r-- | src/tools/clippy/tests/ui/issue-3145.stderr | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/clippy/tests/ui/issue-3145.rs b/src/tools/clippy/tests/ui/issue-3145.rs index f497d5550af..586d13647d1 100644 --- a/src/tools/clippy/tests/ui/issue-3145.rs +++ b/src/tools/clippy/tests/ui/issue-3145.rs @@ -1,3 +1,3 @@ fn main() { - println!("{}" a); //~ERROR expected token: `,` + println!("{}" a); //~ERROR expected `,`, found `a` } diff --git a/src/tools/clippy/tests/ui/issue-3145.stderr b/src/tools/clippy/tests/ui/issue-3145.stderr index cb0d95f5e26..a35032aa150 100644 --- a/src/tools/clippy/tests/ui/issue-3145.stderr +++ b/src/tools/clippy/tests/ui/issue-3145.stderr @@ -1,7 +1,7 @@ -error: expected token: `,` +error: expected `,`, found `a` --> $DIR/issue-3145.rs:2:19 | -LL | println!("{}" a); //~ERROR expected token: `,` +LL | println!("{}" a); //~ERROR expected `,`, found `a` | ^ expected `,` error: aborting due to previous error |
