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