phd-typst/assets/dash-3d-implementation/undefined-behaviour-error.txt

11 lines
378 B
Plaintext
Raw Normal View History

2023-04-14 18:27:59 +02:00
error[E0502]: cannot borrow `vec` as mutable because it is also borrowed as immutable
--> src/main.rs:4:9
|
3 | for value in &vec {
| ----
| |
| immutable borrow occurs here
| immutable borrow later used here
4 | vec.push(*value);
| ^^^^^^^^^^^^^^^^ mutable borrow occurs here