]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_borrowck/src/diagnostics/region_errors.rs
Account for dereference expressions
[rust.git] / compiler / rustc_borrowck / src / diagnostics / region_errors.rs
index 7aa099433a76d902145decf600c3fac97be5ded7..9bc2e79e29bc17c9b96a77b7ca99013312159a76 100644 (file)
@@ -921,7 +921,7 @@ fn suggest_move_on_borrowing_closure(&self, diag: &mut Diagnostic) {
                 }
             }
             hir::ExprKind::Block(blk, _) => {
-                if let Some(ref expr) = blk.expr {
+                if let Some(expr) = blk.expr {
                     // only when the block is a closure
                     if let hir::ExprKind::Closure(hir::Closure {
                         capture_clause: hir::CaptureBy::Ref,