-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #103444 - chenyukang:yukang/fix-103425-extra-diag, r=…
…davidtwco Remove extra type error after missing semicolon error Fixes #103425
- Loading branch information
Showing
3 changed files
with
80 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
fn f() -> f32 { | ||
3 | ||
//~^ ERROR expected `;` | ||
5.0 | ||
} | ||
|
||
fn k() -> f32 { | ||
2_u32 | ||
//~^ ERROR expected `;` | ||
3_i8 | ||
//~^ ERROR expected `;` | ||
5.0 | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
error: expected `;`, found `5.0` | ||
--> $DIR/issue-103425.rs:2:6 | ||
| | ||
LL | 3 | ||
| ^ help: add `;` here | ||
LL | | ||
LL | 5.0 | ||
| --- unexpected token | ||
|
||
error: expected `;`, found `3_i8` | ||
--> $DIR/issue-103425.rs:8:10 | ||
| | ||
LL | 2_u32 | ||
| ^ help: add `;` here | ||
LL | | ||
LL | 3_i8 | ||
| ---- unexpected token | ||
|
||
error: expected `;`, found `5.0` | ||
--> $DIR/issue-103425.rs:10:9 | ||
| | ||
LL | 3_i8 | ||
| ^ help: add `;` here | ||
LL | | ||
LL | 5.0 | ||
| --- unexpected token | ||
|
||
error: aborting due to 3 previous errors | ||
|