salsa/tests/compile-fail/panic-when-reading-fields-of-tracked-structs-from-older-revisions.stderr

10 lines
522 B
Text
Raw Normal View History

2024-07-19 12:05:39 +00:00
error[E0502]: cannot borrow `db` as mutable because it is also borrowed as immutable
--> tests/compile-fail/panic-when-reading-fields-of-tracked-structs-from-older-revisions.rs:22:21
2024-05-24 01:16:30 +00:00
|
2024-07-19 12:05:39 +00:00
21 | let tracked = tracked_fn(&db, input);
| --- immutable borrow occurs here
22 | input.set_field(&mut db).to(24);
| ^^^^^^^ mutable borrow occurs here
23 | tracked.field(&db); // tracked comes from prior revision
| ------- immutable borrow later used here