b00236d7f0
[`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 |
||
---|---|---|
.. | ||
test_utils | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
workspace_test | ||
check-fmt.rs | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
headers.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs | ||
workspace.rs |