fork of https://github.com/rust-rocksdb/rust-rocksdb for nextgraph
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
413 B
11 lines
413 B
2 years ago
|
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();
|
||
|
6 | db.transaction()
|
||
|
| ^^^^^^^^^^^^^^^^ borrowed value does not live long enough
|
||
|
7 | };
|
||
|
| - `db` dropped here while still borrowed
|