-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-hardCall for participation: This a hard problem and requires more experience or effort to work onCall for participation: This a hard problem and requires more experience or effort to work onI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when appliedL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions
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)
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingE-hardCall for participation: This a hard problem and requires more experience or effort to work onCall for participation: This a hard problem and requires more experience or effort to work onI-suggestion-causes-errorIssue: The suggestions provided by this Lint cause an ICE/error when appliedIssue: The suggestions provided by this Lint cause an ICE/error when appliedL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestions