File: checkpoint_outlive_db.stderr

package info (click to toggle)
rust-rocksdb 0.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,128 kB
  • sloc: makefile: 2
file content (11 lines) | stat: -rw-r--r-- 439 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
error[E0597]: `db` does not live long enough
 --> tests/fail/checkpoint_outlive_db.rs:6:25
  |
4 |     let _checkpoint = {
  |         ----------- borrow later stored here
5 |         let db = DB::open_default("foo").unwrap();
  |             -- binding `db` declared here
6 |         Checkpoint::new(&db)
  |                         ^^^ borrowed value does not live long enough
7 |     };
  |     - `db` dropped here while still borrowed