]> git.lizzy.rs Git - rust.git/blob - tests/ui/btreemap/btreemap_dropck.stderr
Rollup merge of #106605 - notriddle:notriddle/outdated-rustbook, r=GuillaumeGomez
[rust.git] / tests / ui / btreemap / btreemap_dropck.stderr
1 error[E0505]: cannot move out of `s` because it is borrowed
2   --> $DIR/btreemap_dropck.rs:15:10
3    |
4 LL |     let _map = BTreeMap::from_iter([((), PrintOnDrop(&s))]);
5    |                                                      -- borrow of `s` occurs here
6 LL |     drop(s);
7    |          ^ move out of `s` occurs here
8 LL | }
9    | - borrow might be used here, when `_map` is dropped and runs the `Drop` code for type `BTreeMap`
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0505`.