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

23 lines
914 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
...
LL | let tick2 = || { //~ ERROR closure cannot assign to immutable local variable `tick1`
| ^^ 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
|
LL | let tick2 = || { //~ ERROR closure cannot assign to immutable local variable `tick1`
| ----- help: make this binding mutable: `mut tick2`
2018-08-08 07:28:26 -05:00
...
LL | tick2(); //~ ERROR cannot borrow
| ^^^^^ cannot borrow mutably
error: aborting due to 2 previous errors
Some errors occurred: E0595, E0596.
For more information about an error, try `rustc --explain E0595`.