Add test
This commit is contained in:
parent
15d9ba0133
commit
b8deb93b22
2 changed files with 14 additions and 0 deletions
3
src/test/ui/typeck/call-block.rs
Normal file
3
src/test/ui/typeck/call-block.rs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
let _ = {42}(); //~ ERROR expected function, found `_`
|
||||||
|
}
|
11
src/test/ui/typeck/call-block.stderr
Normal file
11
src/test/ui/typeck/call-block.stderr
Normal file
|
@ -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`.
|
Loading…
Add table
Add a link
Reference in a new issue