summaryrefslogtreecommitdiff
path: root/tests/fail/snapshot_outlive_transaction_db.stderr
blob: d07341f1ae484d1c054ec8dac8f2b7ff9ead6ad2 (plain)
1
2
3
4
5
6
7
8
9
10
error[E0597]: `db` does not live long enough
 --> tests/fail/snapshot_outlive_transaction_db.rs:6:9
  |
4 |     let _snapshot = {
  |         --------- borrow later stored here
5 |         let db = TransactionDB::<SingleThreaded>::open_default("foo").unwrap();
6 |         db.snapshot()
  |         ^^^^^^^^^^^^^ borrowed value does not live long enough
7 |     };
  |     - `db` dropped here while still borrowed