Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Sep 23, 2021
1 parent 15d9ba0 commit b8deb93
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/test/ui/typeck/call-block.rs
@@ -0,0 +1,3 @@
fn main() {
let _ = {42}(); //~ ERROR expected function, found `_`
}
11 changes: 11 additions & 0 deletions src/test/ui/typeck/call-block.stderr
@@ -0,0 +1,11 @@
error[E0618]: expected function, found `_`
--> $DIR/call-block.rs:2:13
|
LL | let _ = {42}();
| ^^^^--
| |
| call expression requires function

error: aborting due to previous error

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

0 comments on commit b8deb93

Please sign in to comment.