Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #7789 - flip1995:double_semi_if_nothing_returned, r=cam…
…steffen 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
- Loading branch information