Auto merge of #88175 - camsteffen:let-desugar-span, r=Manishearth
Add expansion to while desugar spans In the same vein as #88163, this reverts a change in Clippy behavior as a result of #80357 (and reverts some `#[allow]`s): This changes `clippy::blocks_in_if_conditions` to not fire on `while` loops. Though we might actually want Clippy to lint those cases, we should introduce the change purposefully, with tests, and possibly under a different lint name. The actual change here is to add a desugaring expansion to the spans when lowering a `while` loop. r? `@Manishearth`
This commit is contained in:
commit
e737694a4d
7 changed files with 28 additions and 24 deletions
|
@ -1101,6 +1101,7 @@ pub enum DesugaringKind {
|
|||
Await,
|
||||
ForLoop(ForLoopLoc),
|
||||
LetElse,
|
||||
WhileLoop,
|
||||
}
|
||||
|
||||
/// A location in the desugaring of a `for` loop
|
||||
|
@ -1122,6 +1123,7 @@ impl DesugaringKind {
|
|||
DesugaringKind::OpaqueTy => "`impl Trait`",
|
||||
DesugaringKind::ForLoop(_) => "`for` loop",
|
||||
DesugaringKind::LetElse => "`let...else`",
|
||||
DesugaringKind::WhileLoop => "`while` loop",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue