]> git.lizzy.rs Git - rust.git/blob - src/test/ui/assign-to-method.stderr
Auto merge of #67000 - spastorino:remove-promoted-from-place, r=oli-obk
[rust.git] / src / test / ui / assign-to-method.stderr
1 error[E0615]: attempted to take value of method `speak` on type `Cat`
2   --> $DIR/assign-to-method.rs:20:8
3    |
4 LL |   nyan.speak = || println!("meow");
5    |        ^^^^^
6    |
7    = help: methods are immutable and cannot be assigned to
8
9 error[E0615]: attempted to take value of method `speak` on type `Cat`
10   --> $DIR/assign-to-method.rs:21:8
11    |
12 LL |   nyan.speak += || println!("meow");
13    |        ^^^^^
14    |
15    = help: methods are immutable and cannot be assigned to
16
17 error: aborting due to 2 previous errors
18
19 For more information about this error, try `rustc --explain E0615`.