Add tests for various ways to write 'do' and 'for' without args
This commit is contained in:
parent
f2e2a14f36
commit
bfa43ca301
1 changed files with 16 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue