diff options
| author | Gary Guo <gary@garyguo.net> | 2021-10-09 22:11:13 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2022-01-07 22:54:28 +0000 |
| commit | 356b0246d9a884febc89049b85c07eb678658b95 (patch) | |
| tree | b7681a58dd9c4acb359e090f054bc717f393a0a8 | |
| parent | d7a60337fcee0c484405c3572f2139f39284e95b (diff) | |
| download | rust-356b0246d9a884febc89049b85c07eb678658b95.tar.gz rust-356b0246d9a884febc89049b85c07eb678658b95.zip | |
Remove span from UpvarCapture::ByValue
This span is unused and is superseded by capture_kind_expr_id in CaptureInfo
| -rw-r--r-- | clippy_utils/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_utils/src/lib.rs b/clippy_utils/src/lib.rs index 9179e67c4f4..5ce68bc4d1d 100644 --- a/clippy_utils/src/lib.rs +++ b/clippy_utils/src/lib.rs @@ -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 => { |
