rust/tests/ui/methods/issue-3707.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
269 B
Rust
Raw Normal View History

2013-01-03 23:35:19 +00:00
struct Obj {
member: usize
2013-01-03 23:35:19 +00:00
}
impl Obj {
pub fn boom() -> bool {
2015-01-31 16:23:42 +00:00
return 1+1 == 2
2013-01-03 23:35:19 +00:00
}
pub fn chirp(&self) {
self.boom(); //~ ERROR no method named `boom` found
2013-01-03 23:35:19 +00:00
}
}
fn main() {
let o = Obj { member: 0 };
o.chirp();
2015-01-31 16:23:42 +00:00
1 + 1;
2013-01-03 23:35:19 +00:00
}