Closed
Description
The following code triggers clippy::borrowed_box
:
trait Whatever {}
struct Something;
impl Whatever for Something {}
fn func(flag: bool, secret: &mut Box<Whatever>) {
*secret = Box::new(Something);
}
However, I don't think it should be complaining here since Whatever
is not Sized
(so I cannot overwrite it directly)
I think, this issue (or similar) was raised before: #1884 (also mentioned in #3128)
The fix for #1884 was, however, just to check for Any
trait as a special case.
Metadata
Metadata
Assignees
Labels
No labels