Skip to content

Commit

Permalink
Remove span from UpvarCapture::ByValue
Browse files Browse the repository at this point in the history
This span is unused and is superseded by capture_kind_expr_id in CaptureInfo
  • Loading branch information
nbdd0121 committed Jan 7, 2022
1 parent d7a6033 commit 356b024
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_utils/src/lib.rs
Expand Up @@ -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 => {
Expand Down

0 comments on commit 356b024

Please sign in to comment.