]> git.lizzy.rs Git - rust.git/blob - tests/ui/self/class-missing-self.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / self / class-missing-self.rs
1 struct Cat {
2   meows : usize,
3 }
4
5 impl Cat {
6     fn sleep(&self) { loop{} }
7     fn meow(&self) {
8       println!("Meow");
9       meows += 1; //~ ERROR cannot find value `meows` in this scope
10       sleep();     //~ ERROR cannot find function `sleep` in this
11     }
12
13 }
14
15
16  fn main() { }