Tools
Diagnostics
The checker shows where an operation stopped being legal.
fn main() -> i32 {
let mut count = 1;
let view = &count;
let change = &mut count;
change.* = 2;
return view.*;
}terminal
hopper run demo src
The second borrow conflicts because the first is still used later. In the CLI, Hopper can also label related locations, such as where the first borrow starts and ends.