rust/src/test/ui/unboxed-closures/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.stderr

23 lines
772 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0595]: closure cannot assign to immutable local variable `tick1`
2018-12-25 09:56:47 -06:00
--> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:16:17
2018-08-08 07:28:26 -05:00
|
LL | let tick1 = || {
| ----- help: make this binding mutable: `mut tick1`
2018-08-08 07:28:26 -05:00
...
2019-03-09 06:03:44 -06:00
LL | let tick2 = || {
2018-08-08 07:28:26 -05:00
| ^^ cannot borrow mutably
error[E0596]: cannot borrow immutable local variable `tick2` as mutable
2018-12-25 09:56:47 -06:00
--> $DIR/unboxed-closures-infer-fnmut-calling-fnmut-no-mut.rs:20:5
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | let tick2 = || {
| ----- help: make this binding mutable: `mut tick2`
2018-08-08 07:28:26 -05:00
...
2019-03-09 06:03:44 -06:00
LL | tick2();
2018-08-08 07:28:26 -05:00
| ^^^^^ cannot borrow mutably
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0595, E0596.
2018-08-08 07:28:26 -05:00
For more information about an error, try `rustc --explain E0595`.