E0599E0599 — No Method Named X Found for Type
The method does not exist on the given type, or the required trait is not in scope.
E0502A value cannot be mutably borrowed while an immutable borrow is still active.
Rust enforces that you cannot have a mutable reference and an immutable reference to the same data at the same time. The immutable borrow is still in use when you try to take a mutable borrow.
Restructure the code so the immutable borrow ends before the mutable borrow begins. Clone the data if you need independent copies. Use a block to limit the scope of the immutable borrow.
let mut v = vec![1, 2];
let r = &v[0];
v.push(3);
println!("{}", r);E0599The method does not exist on the given type, or the required trait is not in scope.
E0597A reference outlives the data it points to.
E0133An unsafe function or operation is used outside of an unsafe block.
E0308Different match arms return incompatible types.
E0384A variable is being reassigned but was not declared as mutable.
E0200An unsafe trait must be implemented with an unsafe impl block.