Apply Centril's suggestion

Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
This commit is contained in:
Eric Huss 2019-08-13 15:09:11 -07:00 committed by GitHub
parent ea1a9a0e2b
commit 643ddfaaa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1199,7 +1199,7 @@ impl<'a> Parser<'a> {
if self.eat_keyword(kw::Else) || !cond.returns() {
let sp = self.sess.source_map().next_point(lo);
let mut err = self.diagnostic()
.struct_span_err(sp, "missing condition for `if` statement");
.struct_span_err(sp, "missing condition for `if` expression");
err.span_label(sp, "expected if condition here");
return Err(err)
}

View File

@ -1,10 +1,10 @@
error: missing condition for `if` statement
error: missing condition for `if` expression
--> $DIR/issue-13483.rs:3:14
|
LL | } else if {
| ^ expected if condition here
error: missing condition for `if` statement
error: missing condition for `if` expression
--> $DIR/issue-13483.rs:10:14
|
LL | } else if {