Add tests for various ways to write 'do' and 'for' without args

This commit is contained in:
Brian Anderson 2012-07-04 17:30:46 -07:00
parent f2e2a14f36
commit bfa43ca301

View 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 { }
}