Closed
Description
warning: cannot borrow `*self` as mutable because it is also borrowed as immutable
--> src/validator/json.rs:1989:19
|
1900 | Value::Object(o) => match &self.occurrence {
| ---------------- immutable borrow occurs here
...
1989 | / self.add_error(format!(
1990 | | "object must contain no more than {} entries of key of type {}",
1991 | | upper, ident,
| | ----- immutable borrow later used here
1992 | | ));
| |____________________^ mutable borrow occurs here
|
= warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
= note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
The same warning occurs multiple times for the same code pattern used elsewhere.