Rollup merge of #82031 - LingMan:unneeded_var, r=varkor
Drop an unnecessary intermediate variable Neither does it shorten the code nor does it provide a helpful name. `@rustbot` modify labels +C-cleanup +T-compiler r? `@varkor`
This commit is contained in:
commit
f6677b0f52
1 changed files with 1 additions and 3 deletions
|
@ -260,8 +260,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
// local crate or were inlined into it along with some function.
|
// local crate or were inlined into it along with some function.
|
||||||
// This may change if abstract return types of some sort are
|
// This may change if abstract return types of some sort are
|
||||||
// implemented.
|
// implemented.
|
||||||
let tcx = self.tcx;
|
|
||||||
|
|
||||||
self.typeck_results
|
self.typeck_results
|
||||||
.borrow()
|
.borrow()
|
||||||
.closure_min_captures_flattened(closure_id)
|
.closure_min_captures_flattened(closure_id)
|
||||||
|
@ -276,7 +274,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
||||||
|
|
||||||
match capture {
|
match capture {
|
||||||
ty::UpvarCapture::ByValue(_) => upvar_ty,
|
ty::UpvarCapture::ByValue(_) => upvar_ty,
|
||||||
ty::UpvarCapture::ByRef(borrow) => tcx.mk_ref(
|
ty::UpvarCapture::ByRef(borrow) => self.tcx.mk_ref(
|
||||||
borrow.region,
|
borrow.region,
|
||||||
ty::TypeAndMut { ty: upvar_ty, mutbl: borrow.kind.to_mutbl_lossy() },
|
ty::TypeAndMut { ty: upvar_ty, mutbl: borrow.kind.to_mutbl_lossy() },
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue