summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-18685.rs
blob: bfe24b663f60fb7c7fb16e8627e41236075e00ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// run-pass
// Test that the self param space is not used in a conflicting
// manner by unboxed closures within a default method on a trait

// pretty-expanded FIXME #23616

trait Tr {
    fn foo(&self);

    fn bar(&self) {
        (|| { self.foo() })()
    }
}

impl Tr for () {
    fn foo(&self) {}
}

fn main() {
    ().bar();
}