diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-25 11:25:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-25 11:25:50 +0200 |
| commit | 6ded356d9c73648206bcb2c34744b76d6384c02e (patch) | |
| tree | b621f25bcac4d4e2c531c2de9b46672f7be42c18 /src/test/debuginfo/enum-thinlto.rs | |
| parent | cbbf065425050a90126e0da070a92109faf62140 (diff) | |
| parent | 898cbf265a1bff978a258b0c63028b2df5d4f6c1 (diff) | |
| download | rust-6ded356d9c73648206bcb2c34744b76d6384c02e.tar.gz rust-6ded356d9c73648206bcb2c34744b76d6384c02e.zip | |
Rollup merge of #71494 - flip1995:while_let_span, r=petrochenkov
Fix span of while (let) expressions after lowering Credit goes to @alex-700 who found this while trying to fix a suggestion in Clippy. While `if`, `try`, `for` and `await` expressions get the span of the original expression when desugared, `while` loops got the span of the scrutinee, which lead to weird code, when building the suggestion, that randomly worked: https://github.com/rust-lang/rust-clippy/pull/5511/files#diff-df4e9d2bf840a5f2e3b580bef73da3bcR106-R108 I'm wondering, if `DesugaringKind` should get a variant `WhileLoop` and instead of using the span of the `ast::ExprKind::While` expr directly, a new span with `self.mark_span_with_reason` should be used, like it is done with `for` loops. There was some fallout, but I think that is acceptable. If not, I need some help to find out where this can be fixed.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
