Open
Description
E.g., consider a struct with a field build_queue
which is owned. In a &self
function I call request_build
which takes self
by value. I get the error:
error[E0507]: cannot move out of borrowed content
--> src/actions/mod.rs:151:9
|
151 | self.build_queue.request_build(project_path, priority, move |result| {
| ^^^^ cannot move out of borrowed content
This is not very useful since it does not indicate why a move is happening and the squiggle is indicating the wrong thing. I think the squiggle should be under self.build_queue
rather than just self
and that there should be a note referring to the definition of request_build
and indicating the by-value self
which causes the move.