Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning when compiling with rustc 1.61 (or later, probably) #146

Closed
itamarst opened this issue Oct 14, 2022 · 1 comment
Closed

Warning when compiling with rustc 1.61 (or later, probably) #146

itamarst opened this issue Oct 14, 2022 · 1 comment
Labels

Comments

@itamarst
Copy link
Contributor

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.

@anweiss anweiss added the ci/cd label Oct 14, 2022
@anweiss
Copy link
Owner

anweiss commented Oct 14, 2022

See rust-lang/rust#59159. I believe this warning went away with 1.62.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants