summary refs log tree commit diff
path: root/src/test/ui/issues/issue-3707.rs
blob: 844a2dc00698efa7043eda3566e1a7999843e9ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
struct Obj {
    member: usize
}

impl Obj {
    pub fn boom() -> bool {
        return 1+1 == 2
    }
    pub fn chirp(&self) {
        self.boom(); //~ ERROR no method named `boom` found for type `&Obj` in the current scope
    }
}

fn main() {
    let o = Obj { member: 0 };
    o.chirp();
    1 + 1;
}