From d3c041a08696b722da3276846e0064dd03742940 Mon Sep 17 00:00:00 2001 From: Andre Bogus Date: Mon, 3 Oct 2022 17:29:38 +0200 Subject: extend `box-default` lint, add suggestion --- src/docs/box_default.txt | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') diff --git a/src/docs/box_default.txt b/src/docs/box_default.txt index ffac894d0c5..1c670c77333 100644 --- a/src/docs/box_default.txt +++ b/src/docs/box_default.txt @@ -7,12 +7,6 @@ First, it's more complex, involving two calls instead of one. Second, `Box::default()` can be faster [in certain cases](https://nnethercote.github.io/perf-book/standard-library-types.html#box). -### Known problems -The lint may miss some cases (e.g. Box::new(String::from(""))). -On the other hand, it will trigger on cases where the `default` -code comes from a macro that does something different based on -e.g. target operating system. - ### Example ``` let x: Box = Box::new(Default::default()); -- cgit 1.4.1-3-g733a5