1 // compile-flags: -Zsave-analysis
2 // Also regression test for #69409
10 pub fn speak(&self) { self.meows += 1; }
13 fn cat(in_x : usize, in_y : isize) -> Cat {
21 let nyan : Cat = cat(52, 99);
22 nyan.speak = || println!("meow"); //~ ERROR attempted to take value of method
23 nyan.speak += || println!("meow"); //~ ERROR attempted to take value of method