Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
error[E0502]: cannot borrow `generics.params` as mutable because it is also borrowed as immutable --> tests/test_iterators.rs:81:25 | 77 | let _ = generics | -------- | | | _____________immutable borrow occurs here | | 78 | | .lifetimes() | |____________________- a temporary with access to the immutable borrow is created here ... ... 81 | .unwrap_or_else(|| { | ^^ mutable borrow occurs here 82 | let lifetime: Lifetime = parse_quote!('a); 83 | generics.params.insert( | --------------- second borrow occurs due to use of `generics.params` in closure ... 88 | }); | - ... and the immutable borrow might be used here, when that temporary is dropped and runs the destructor for type `impl Iterator<Item = &LifetimeParam>`
- Loading branch information