Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dnbln committed Nov 4, 2023
1 parent 241a654 commit a6b41aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion compiler/rustc_hir_typeck/src/upvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
hir::CaptureBy::Value { .. } if !place.deref_tys().any(Ty::is_ref) => {
ty::UpvarCapture::ByValue
}
hir::CaptureBy::Value { .. } | hir::CaptureBy::Ref => ty::UpvarCapture::ByRef(ty::ImmBorrow),
hir::CaptureBy::Value { .. } | hir::CaptureBy::Ref => {
ty::UpvarCapture::ByRef(ty::ImmBorrow)
}
}
}

Expand Down
4 changes: 1 addition & 3 deletions compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2310,9 +2310,7 @@ impl<'a> Parser<'a> {
Err(errors::AsyncMoveOrderIncorrect { span: move_async_span }
.into_diagnostic(&self.sess.span_diagnostic))
} else {
Ok(CaptureBy::Value {
move_kw: move_kw_span,
})
Ok(CaptureBy::Value { move_kw: move_kw_span })
}
} else {
Ok(CaptureBy::Ref)
Expand Down

0 comments on commit a6b41aa

Please sign in to comment.