Skip to content
Permalink
Browse files

Add a test for #26577

  • Loading branch information...
varkor committed Feb 25, 2019
1 parent 5917d9f commit b4b8a6e0bb6177ef8129805d80c14e0100345dff
@@ -0,0 +1,10 @@
fn foo() -> i32 {
0
}

fn main() {
let x: i32 = {
//~^ ERROR mismatched types
foo(); //~ HELP consider removing this semicolon
};
}
@@ -0,0 +1,17 @@
error[E0308]: mismatched types
--> $DIR/block-expression-remove-semicolon.rs:6:18
|
LL | let x: i32 = {
| __________________^
LL | | //~^ ERROR mismatched types
LL | | foo(); //~ HELP consider removing this semicolon
| | - help: consider removing this semicolon
LL | | };
| |_____^ expected i32, found ()
|
= note: expected type `i32`
found type `()`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.

0 comments on commit b4b8a6e

Please sign in to comment.
You can’t perform that action at this time.