You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works fine with Rust 2018, but with 2015 I'm getting:
error[E0499]: cannot borrow `*input` asmutable more than once at a time
--> src/lib.rs:134:17
|
98 | whileletOk(t) = input.next(){
| ----- - first borrow ends here
| |
| first mutable borrow occurs here
...
134 | input.parse_nested_block(|p| {
| ^^^^^ second mutable borrow occurs here
Is it not possible at all on Rust 2015 or I have to change a code somehow?
The text was updated successfully, but these errors were encountered:
The difference is most likely non-lexical lifetimes, which rust-lang/rust#59114 (comment) enables in the 2015 edition as well. I think that will be in Rust 1.36.
Without NLL, you need to move the next use of input outside of the lexical scope where the return value of input.next() lives. Something like:
I have a code roughly like this:
It works fine with Rust 2018, but with 2015 I'm getting:
Is it not possible at all on Rust 2015 or I have to change a code somehow?
The text was updated successfully, but these errors were encountered: