chiark / gitweb /
adjust re node.js ishness
[talk-2019-ghm-rust.git] / borrow-nonmut-error.txt
1 error[E0596]: cannot borrow immutable borrowed content
2               `*some_string` as mutable
3  --> error.rs:8:5
4   |
5 7 | fn change(some_string: &String) {
6   |                        ------- use `&mut String` here
7   |                                to make mutable
8 8 |     some_string.push_str(", world");
9   |     ^^^^^^^^^^^ cannot borrow as mutable