about summary refs log tree commit diff
path: root/tests/ui/issues/issue-18685.rs
blob: 3dab341f615c7ecbd5a0dd79088bb88da84c4420 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//@ 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


trait Tr {
    fn foo(&self);

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

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

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