mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Fix unused_variables in tests
This commit is contained in:
parent
7834b8fadb
commit
ab52ba2de7
13 changed files with 122 additions and 104 deletions
|
@ -1774,13 +1774,14 @@ impl<'ctx> MirLowerCtx<'ctx> {
|
|||
}
|
||||
}
|
||||
}
|
||||
hir_def::hir::Statement::Expr { expr, has_semi: _ } => {
|
||||
&hir_def::hir::Statement::Expr { expr, has_semi: _ } => {
|
||||
let scope2 = self.push_drop_scope();
|
||||
let Some((_, c)) = self.lower_expr_as_place(current, *expr, true)? else {
|
||||
let Some((p, c)) = self.lower_expr_as_place(current, expr, true)? else {
|
||||
scope2.pop_assume_dropped(self);
|
||||
scope.pop_assume_dropped(self);
|
||||
return Ok(None);
|
||||
};
|
||||
self.push_fake_read(c, p, expr.into());
|
||||
current = scope2.pop_and_drop(self, c);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue