let_and_return shouldn't trigger if the let has an attribute #3882
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
I-suggestion-causes-error
Issue: The suggestions provided by this Lint cause an ICE/error when applied
L-suggestion
Lint: Improving, adding or fixing lint suggestions
This is possibly a generalisation of #1346.
This minimal example shows
let_and_return
triggering for a statement which has a#[allow()]
attribute. Following the clippy suggestion hits rust-lang/rust#15701, which is feature-gated. Worth noting is that braces can be used to work around this, which could be used as a suggestion in this case.The text was updated successfully, but these errors were encountered: