diff options
| author | bors <bors@rust-lang.org> | 2021-10-08 21:30:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-10-08 21:30:16 +0000 |
| commit | 22144c02c2d790c2e3b74dc0363000511284f6d8 (patch) | |
| tree | b7adcb3469429666e4d9dbb72271a889d272cd59 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 78e73129baf65f4095002422303157d5e64e9479 (diff) | |
| parent | b423b85ca99c2a085797e228ec405038bbd3308f (diff) | |
| download | rust-22144c02c2d790c2e3b74dc0363000511284f6d8.tar.gz rust-22144c02c2d790c2e3b74dc0363000511284f6d8.zip | |
Auto merge of #7789 - flip1995:double_semi_if_nothing_returned, r=camsteffen
Don't trigger semicolon_if_nothing_returned in expanded code Fixes #7768 Before, this lint didn't trigger on macros. With rust-lang/rust#88175 this isn't enough anymore. In this PR a `WhileLoop` desugaring kind was introduced. This overrides the span of expanded expressions when lowering the while loop. So if a while loop is in a macro, the expressions that it expands to are no longer marked with `ExpnKind::Macro`, but with `ExpnKind::Desugaring`. In general, this is the correct behavior and the same that is done for `ForLoop`s. It just tripped up this lint. r? `@camsteffen` changelog: [`semicolon_if_nothing_returned`]: Fix regression on macros containing while loops
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
