blob: 05fbc5665e033aa886dc3dfe8a64699ed3b32cac (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
error[E0597]: `db` does not live long enough
--> tests/fail/snapshot_outlive_db.rs:6:9
|
4 | let _snapshot = {
| --------- borrow later stored here
5 | let db = DB::open_default("foo").unwrap();
| -- binding `db` declared here
6 | db.snapshot()
| ^^^^^^^^^^^^^ borrowed value does not live long enough
7 | };
| - `db` dropped here while still borrowed
|