blob: 653c1a8ec7da0a48f6ca768ddd4fbfd5aa318216 (
plain)
1
2
3
4
5
6
7
8
9
10
|
error[E0597]: `txn` does not live long enough
--> tests/fail/snapshot_outlive_transaction.rs:7:9
|
5 | let _snapshot = {
| --------- borrow later stored here
6 | let txn = db.transaction();
7 | txn.snapshot()
| ^^^^^^^^^^^^^^ borrowed value does not live long enough
8 | };
| - `txn` dropped here while still borrowed
|