about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2021-10-09 22:11:13 +0100
committerGary Guo <gary@garyguo.net>2022-01-07 22:54:28 +0000
commit3698e03fb60893786843df01b50dc8326f6c5c5a (patch)
treeaab8addff3b7e028a15b50bba89fb244552e22d5 /compiler/rustc_borrowck/src
parente012a191d768adeda1ee36a99ef8b92d51920154 (diff)
downloadrust-3698e03fb60893786843df01b50dc8326f6c5c5a.tar.gz
rust-3698e03fb60893786843df01b50dc8326f6c5c5a.zip
Remove span from UpvarCapture::ByValue
This span is unused and is superseded by capture_kind_expr_id in CaptureInfo
Diffstat (limited to 'compiler/rustc_borrowck/src')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs2
-rw-r--r--compiler/rustc_borrowck/src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
index b5dad5ccdea..73a5a9cf0c3 100644
--- a/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs
@@ -712,7 +712,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, 'tcx> {
                             }) => {
                                 capture_reason = format!("mutable borrow of `{}`", upvar);
                             }
-                            ty::UpvarCapture::ByValue(_) => {
+                            ty::UpvarCapture::ByValue => {
                                 capture_reason = format!("possible mutation of `{}`", upvar);
                             }
                             _ => bug!("upvar `{}` borrowed, but not mutably", upvar),
diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs
index fe34d6e7ca9..7e961e1e750 100644
--- a/compiler/rustc_borrowck/src/lib.rs
+++ b/compiler/rustc_borrowck/src/lib.rs
@@ -186,7 +186,7 @@ fn do_mir_borrowck<'a, 'tcx>(
         .map(|captured_place| {
             let capture = captured_place.info.capture_kind;
             let by_ref = match capture {
-                ty::UpvarCapture::ByValue(_) => false,
+                ty::UpvarCapture::ByValue => false,
                 ty::UpvarCapture::ByRef(..) => true,
             };
             Upvar { place: captured_place.clone(), by_ref }