File: open_with_multiple_refs_as_single_threaded.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 (21 lines) | stat: -rw-r--r-- 851 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
error[E0596]: cannot borrow `*db_ref1` as mutable, as it is behind a `&` reference
 --> tests/fail/open_with_multiple_refs_as_single_threaded.rs:8:5
  |
8 |     db_ref1.create_cf("cf1", &opts).unwrap();
  |     ^^^^^^^ `db_ref1` is a `&` reference, so the data it refers to cannot be borrowed as mutable
  |
help: consider changing this to be a mutable reference
  |
5 |     let db_ref1 = &mut db;
  |                    +++

error[E0596]: cannot borrow `*db_ref2` as mutable, as it is behind a `&` reference
 --> tests/fail/open_with_multiple_refs_as_single_threaded.rs:9:5
  |
9 |     db_ref2.create_cf("cf2", &opts).unwrap();
  |     ^^^^^^^ `db_ref2` is a `&` reference, so the data it refers to cannot be borrowed as mutable
  |
help: consider changing this to be a mutable reference
  |
6 |     let db_ref2 = &mut db;
  |                    +++