Remove span from UpvarCapture::ByValue
This span is unused and is superseded by capture_kind_expr_id in CaptureInfo
This commit is contained in:
parent
e012a191d7
commit
3698e03fb6
11 changed files with 28 additions and 45 deletions
|
@ -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),
|
||||
|
|
|
@ -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 }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue