improve error message for unexpected comma token in multiline block
confusing diagnostics, issue #72253 add test for confusing error message, issue-72253 remove is_multiline check, refactor to self.expect(&token:Semi) update issue-72253 tests return Ok
This commit is contained in:
parent
914adf04af
commit
f384cdcbec
3 changed files with 29 additions and 0 deletions
6
src/test/ui/issues/issue-72253.rs
Normal file
6
src/test/ui/issues/issue-72253.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
fn main() {
|
||||
let a = std::process::Command::new("echo")
|
||||
.arg("1")
|
||||
,arg("2") //~ ERROR expected one of `.`, `;`, `?`, or an operator, found `,`
|
||||
.output();
|
||||
}
|
||||
10
src/test/ui/issues/issue-72253.stderr
Normal file
10
src/test/ui/issues/issue-72253.stderr
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
error: expected one of `.`, `;`, `?`, or an operator, found `,`
|
||||
--> $DIR/issue-72253.rs:4:9
|
||||
|
|
||||
LL | .arg("1")
|
||||
| - expected one of `.`, `;`, `?`, or an operator
|
||||
LL | ,arg("2")
|
||||
| ^ unexpected token
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue