From 2ff14448863ac1a1dd9533461708e29aae170c2d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:06:31 +0200 Subject: Adding debian version 1.65.0+dfsg1-2. Signed-off-by: Daniel Baumann --- src/test/ui/borrowck/suggest-as-ref-on-mut-closure.stderr | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/test/ui/borrowck/suggest-as-ref-on-mut-closure.stderr') diff --git a/src/test/ui/borrowck/suggest-as-ref-on-mut-closure.stderr b/src/test/ui/borrowck/suggest-as-ref-on-mut-closure.stderr index af26169c8..b1af090ae 100644 --- a/src/test/ui/borrowck/suggest-as-ref-on-mut-closure.stderr +++ b/src/test/ui/borrowck/suggest-as-ref-on-mut-closure.stderr @@ -5,6 +5,7 @@ LL | cb.map(|cb| cb()); | ^^^-------------- | | | | | `*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 | note: this function takes ownership of the receiver `self`, which moves `*cb` @@ -12,10 +13,6 @@ note: this function takes ownership of the receiver `self`, which moves `*cb` | LL | pub const fn map(self, f: F) -> Option | ^^^^ -help: consider calling `.as_ref()` to borrow the type's contents - | -LL | cb.as_ref().map(|cb| cb()); - | +++++++++ error[E0596]: cannot borrow `*cb` as mutable, as it is behind a `&` reference --> $DIR/suggest-as-ref-on-mut-closure.rs:12:26 -- cgit v1.2.3