boxed_local false positive for ?Sized #4740
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
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
Playground
This is kind of an interesting case; the suggestion isn't wrong per se, but it's definitely not optimal. The lint explainer as currently worded strongly suggests "an unboxed
T
would work fine", whereas with?Sized
values this obviously cannot be done. The owned value has to be boxed or otherwise behind an indirection.The text was updated successfully, but these errors were encountered: