fix: preserve closure receivers for postfix chains - #7013
Conversation
There was a problem hiding this comment.
We can't just flip this from false to true for all of the variants listed It doesn't apply for ExprKind::Try. Also, as I mentioned in #7011 (comment) we should consider renaming is_method_call_receiver since that doesn't really apply now that we're also using that field for field, await, use, and postfix yield.
| | ast::ExprKind::Yield(ast::YieldKind::Postfix(ref subexpr)) => Some(SubExpr { | ||
| expr: Self::convert_try(subexpr, context), | ||
| is_method_call_receiver: false, | ||
| is_method_call_receiver: true, |
There was a problem hiding this comment.
I don't think this is supposed to apply to ast::ExprKind::Try
|
Reminder, once the PR becomes ready for a review, use |
5f4446c to
688ff00
Compare
|
@rustbot ready |
|
Addressed the review in the current head: |
Summary
Fixes #7011.
Testing
cargo testRUSTFLAGS="-D warnings" cargo testcargo run --bin rustfmt -- --check src/chains.rsgit diff --check