False positive box_default inside macro #11868
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
If
Box::new
is used in a macro and then this macro is called with a default value at least once, then the lint is triggered even if in other macro invocations,default
could not be used - see code below.Link to the playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=9e737f21f166c1cb8ad0cce037fb5649
Lint Name
box_default
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: