about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-09-29 18:49:57 +0000
committerbors <bors@rust-lang.org>2023-09-29 18:49:57 +0000
commitb00236d7f0537b22794be838064c944a36e85c70 (patch)
treeaa26d6fdbef44ff2716c791accbcaa55a111de3f /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
parent67a83ff0576488faf22ee73d40d3c3590c832224 (diff)
parent2d2017942afc221da0295962ac0374bd31cc6d1c (diff)
downloadrust-b00236d7f0537b22794be838064c944a36e85c70.tar.gz
rust-b00236d7f0537b22794be838064c944a36e85c70.zip
Auto merge of #11580 - y21:issue11579, r=Jarcho
[`manual_let_else`]: only omit block if span is from same ctxt

Fixes #11579.

The lint already had logic for omitting a block in `else` if a block is already present, however this didn't handle the case where the block is from a different expansion/syntax context. E.g.
```rs
macro_rules! panic_in_block {
  () => { { panic!() } }
}

let _ = match Some(1) {
  Some(v) => v,
  _ => panic_in_block!()
};
```
It would see this in its expanded form as `_ => { panic!() }` and think it doesn't have to include a block in its suggestion because it is already there, however that's not true if it's from a different expansion like in this case.

changelog: [`manual_let_else`]: only omit block in suggestion if the block is from the same expansion
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions