rust/src/test/ui/assign-to-method.stderr

20 lines
669 B
Plaintext
Raw Normal View History

error[E0615]: attempted to take value of method `speak` on type `Cat`
2018-12-25 08:56:47 -07:00
--> $DIR/assign-to-method.rs:20:8
2018-08-08 14:28:26 +02:00
|
LL | nyan.speak = || println!("meow"); //~ ERROR attempted to take value of method
| ^^^^^
|
= help: methods are immutable and cannot be assigned to
2018-08-08 14:28:26 +02:00
error[E0615]: attempted to take value of method `speak` on type `Cat`
--> $DIR/assign-to-method.rs:21:8
|
LL | nyan.speak += || println!("meow"); //~ ERROR attempted to take value of method
| ^^^^^
|
= help: methods are immutable and cannot be assigned to
error: aborting due to 2 previous errors
2018-08-08 14:28:26 +02:00
For more information about this error, try `rustc --explain E0615`.