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.
rust-rocksdb/tests/fail/snapshot_outlive_transactio...

11 lines
371 B

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