Open
Description
error[E0500]: closure requires unique access to `this` but it is already borrowed
--> src/simple_api/mod.rs:1150:55
|
1147 | unsafe fn get_last_buffer(this: &mut Key) -> &mut Vec<u8> {
| - let's call the lifetime of this reference `'1`
...
1150 | this.subscripts.last_mut().unwrap_or_else(|| this.variable.as_mut_vec())
| ------------------------------------------^^----------------------------
| | | |
| | | second borrow occurs due to use of `this` in closure
| | closure construction occurs here
| borrow occurs here
| returning this value requires that `this.subscripts` is borrowed for `'1`
Originally posted by @jyn514 in #6675 (comment)