rust/src/test/compile-fail/class-missing-self.rs

15 lines
272 B
Rust
Raw Normal View History

2012-08-15 20:46:55 -05:00
struct cat {
priv {
let mut meows : uint;
fn sleep() { loop{} }
fn meow() {
2012-08-22 19:24:52 -05:00
error!("Meow");
meows += 1u; //~ ERROR unresolved name
sleep(); //~ ERROR unresolved name
}
}
new(in_x : uint) { self.meows = in_x; }
}
fn main() { }