separate the receiver from arguments in HIR
This commit is contained in:
parent
6e4a9ab650
commit
87c6da363f
27 changed files with 115 additions and 96 deletions
|
@ -1039,9 +1039,12 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
|
|||
self.propagate_through_expr(&f, succ)
|
||||
}
|
||||
|
||||
hir::ExprKind::MethodCall(.., ref args, _) => {
|
||||
hir::ExprKind::MethodCall(.., receiver, ref args, _) => {
|
||||
let succ = self.check_is_ty_uninhabited(expr, succ);
|
||||
self.propagate_through_exprs(args, succ)
|
||||
std::iter::once(receiver)
|
||||
.chain(args.iter())
|
||||
.rev()
|
||||
.fold(succ, |succ, expr| self.propagate_through_expr(expr, succ))
|
||||
}
|
||||
|
||||
hir::ExprKind::Tup(ref exprs) => self.propagate_through_exprs(exprs, succ),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue