Commit Graph

5 Commits

Author SHA1 Message Date
Samuel Tardieu
92c403c9b0 Box::default(): do not omit the type of the removed trait object
Within a larger expression, when the type of `Box::new(T::default())` is
`Box<dyn Trait>`, the concrete type `T` cannot be omitted in the
proposed replacement `Box::<T>::default()`.
2023-02-20 11:58:27 +01:00
Andre Bogus
d23dce54ec add a test against #100898 2023-01-08 20:25:42 +01:00
Andre Bogus
bd61fdbd5f fix box-default ignoring trait objects' types 2022-10-10 21:11:37 +02:00
Andre Bogus
d3c041a086 extend box-default lint, add suggestion 2022-10-06 16:00:45 +02:00
Andre Bogus
63f441ec85 add box-default lint 2022-09-27 13:26:23 +02:00