diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr (renamed from src/test/ui/borrowck/suggest-as-ref-on-mut-closure.stderr) | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/test/ui/borrowck/suggest-as-ref-on-mut-closure.stderr b/tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr index b1af090ae..4621d8793 100644 --- a/src/test/ui/borrowck/suggest-as-ref-on-mut-closure.stderr +++ b/tests/ui/borrowck/suggest-as-ref-on-mut-closure.stderr @@ -8,11 +8,8 @@ LL | cb.map(|cb| cb()); | 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 | -note: this function takes ownership of the receiver `self`, which moves `*cb` +note: `Option::<T>::map` takes ownership of the receiver `self`, which moves `*cb` --> $SRC_DIR/core/src/option.rs:LL:COL - | -LL | pub const fn map<U, F>(self, f: F) -> Option<U> - | ^^^^ error[E0596]: cannot borrow `*cb` as mutable, as it is behind a `&` reference --> $DIR/suggest-as-ref-on-mut-closure.rs:12:26 |