Skip to content

Commit b8deb93

Browse files
committed
Add test
1 parent 15d9ba0 commit b8deb93

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/test/ui/typeck/call-block.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
let _ = {42}(); //~ ERROR expected function, found `_`
3+
}

src/test/ui/typeck/call-block.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0618]: expected function, found `_`
2+
--> $DIR/call-block.rs:2:13
3+
|
4+
LL | let _ = {42}();
5+
| ^^^^--
6+
| |
7+
| call expression requires function
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0618`.

0 commit comments

Comments
 (0)