Skip to content

Commit 73f859e

Browse files
Rollup merge of #81631 - LingMan:rem_var, r=davidtwco
Remove unneeded `mut` variable `arg_elide` gets initialized, immediately cloned, and only written to after that. The last reading access was removed back in 7704762
2 parents d2f96a9 + 8e34522 commit 73f859e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

compiler/rustc_resolve/src/late/lifetimes.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -2083,18 +2083,11 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
20832083
output: Option<&'tcx hir::Ty<'tcx>>,
20842084
) {
20852085
debug!("visit_fn_like_elision: enter");
2086-
let mut arg_elide = Elide::FreshLateAnon(Cell::new(0));
2087-
let arg_scope = Scope::Elision { elide: arg_elide.clone(), s: self.scope };
2086+
let arg_scope = Scope::Elision { elide: Elide::FreshLateAnon(Cell::new(0)), s: self.scope };
20882087
self.with(arg_scope, |_, this| {
20892088
for input in inputs {
20902089
this.visit_ty(input);
20912090
}
2092-
match *this.scope {
2093-
Scope::Elision { ref elide, .. } => {
2094-
arg_elide = elide.clone();
2095-
}
2096-
_ => bug!(),
2097-
}
20982091
});
20992092

21002093
let output = match output {

0 commit comments

Comments
 (0)