fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0505]: cannot move out of `s` because it is borrowed 2 --> $DIR/btreemap_dropck.rs:15:10 3 | 4LL | let s = String::from("Hello World!"); 5 | - binding `s` declared here 6LL | let _map = BTreeMap::from_iter([((), PrintOnDrop(&s))]); 7 | -- borrow of `s` occurs here 8LL | drop(s); 9 | ^ move out of `s` occurs here 10LL | } 11 | - borrow might be used here, when `_map` is dropped and runs the `Drop` code for type `BTreeMap` 12 13error: aborting due to previous error 14 15For more information about this error, try `rustc --explain E0505`.