diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr b/tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr index 4621d8793..bada08368 100644 --- a/tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr +++ b/tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr @@ -2,9 +2,8 @@ error[E0507]: cannot move out of `*cb` which is behind a mutable reference --> $DIR/suggest-as-ref-on-mut-closure.rs:7:5 | LL | cb.map(|cb| cb()); - | ^^^-------------- - | | | - | | `*cb` moved due to this method call + | ^^ -------------- `*cb` moved due to this method call + | | | help: consider calling `.as_ref()` or `.as_mut()` to borrow the type's contents | move occurs because `*cb` has type `Option<&mut dyn FnMut()>`, which does not implement the `Copy` trait | |