Add tests for various ways to write 'do' and 'for' without args
This commit is contained in:
parent
f2e2a14f36
commit
bfa43ca301
16
src/test/run-pass/do-for-empty-args.rs
Normal file
16
src/test/run-pass/do-for-empty-args.rs
Normal file
@ -0,0 +1,16 @@
|
||||
// no-reformat
|
||||
// Testing various forms of `do` and `for` with empty arg lists
|
||||
|
||||
fn f(f: fn() -> bool) {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
do f() || { true }
|
||||
do f() { true }
|
||||
do f || { true }
|
||||
do f { true }
|
||||
for f() || { }
|
||||
for f() { }
|
||||
for f || { }
|
||||
for f { }
|
||||
}
|
Loading…
Reference in New Issue
Block a user