Add test
This commit is contained in:
parent
15d9ba0133
commit
b8deb93b22
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…
x
Reference in New Issue
Block a user