summary refs log tree commit diff
path: root/src/test/run-pass/do-for-empty-args.rs
blob: e486980af7b5cd756993f8c5aa84ee6c7cb97f9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 { }
}