Remove spurious complaint about missing expression for bare semicolons
This commit is contained in:
parent
99be87aac3
commit
1495d30448
3 changed files with 27 additions and 9 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
fn main() {
|
||||
foo(bar(;
|
||||
//~^ ERROR: expected expression, found `;`
|
||||
//~^ ERROR cannot find function `bar` in this scope
|
||||
}
|
||||
//~^ ERROR: incorrect close delimiter: `}`
|
||||
|
||||
fn foo(_: usize) {}
|
||||
|
|
@ -1,9 +1,3 @@
|
|||
error: expected expression, found `;`
|
||||
--> $DIR/token-error-correct.rs:4:13
|
||||
|
|
||||
LL | foo(bar(;
|
||||
| ^ expected expression
|
||||
|
||||
error: incorrect close delimiter: `}`
|
||||
--> $DIR/token-error-correct.rs:6:1
|
||||
|
|
||||
|
|
@ -11,9 +5,16 @@ LL | fn main() {
|
|||
| - close delimiter possibly meant for this
|
||||
LL | foo(bar(;
|
||||
| - un-closed delimiter
|
||||
LL | //~^ ERROR: expected expression, found `;`
|
||||
LL | //~^ ERROR cannot find function `bar` in this scope
|
||||
LL | }
|
||||
| ^ incorrect close delimiter
|
||||
|
||||
error[E0425]: cannot find function `bar` in this scope
|
||||
--> $DIR/token-error-correct.rs:4:9
|
||||
|
|
||||
LL | foo(bar(;
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0425`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue