Remove span from UpvarCapture::ByValue

This span is unused and is superseded by capture_kind_expr_id in CaptureInfo
This commit is contained in:
Gary Guo 2021-10-09 22:11:13 +01:00
parent d7a60337fc
commit 356b0246d9

View File

@ -969,7 +969,7 @@ pub fn can_move_expr_to_closure(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) ->
};
if !self.locals.contains(&local_id) {
let capture = match capture.info.capture_kind {
UpvarCapture::ByValue(_) => CaptureKind::Value,
UpvarCapture::ByValue => CaptureKind::Value,
UpvarCapture::ByRef(borrow) => match borrow.kind {
BorrowKind::ImmBorrow => CaptureKind::Ref(Mutability::Not),
BorrowKind::UniqueImmBorrow | BorrowKind::MutBorrow => {