2022-09-21 16:43:49 -05:00
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:23:32
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
|
LL | let _string: Box<String> = Box::new(Default::default());
|
2022-10-03 10:29:38 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::default()`
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
2022-10-06 02:19:29 -05:00
|
|
|
= note: `-D clippy::box-default` implied by `-D warnings`
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:24:17
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
|
LL | let _byte = Box::new(u8::default());
|
2022-10-03 10:29:38 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<u8>::default()`
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:25:16
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
|
LL | let _vec = Box::new(Vec::<u8>::new());
|
2023-01-03 17:44:20 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<Vec<u8>>::default()`
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:26:17
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
|
LL | let _impl = Box::new(ImplementsDefault::default());
|
2022-10-03 10:29:38 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<ImplementsDefault>::default()`
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:27:18
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
|
LL | let _impl2 = Box::new(<ImplementsDefault as Default>::default());
|
2022-10-03 10:29:38 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<ImplementsDefault>::default()`
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:28:42
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
|
LL | let _impl3: Box<ImplementsDefault> = Box::new(Default::default());
|
2022-10-03 10:29:38 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::default()`
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:30:28
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
|
|
|
LL | let _in_macro = outer!(Box::new(String::new()));
|
2023-01-03 17:44:20 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<String>::default()`
|
2022-10-03 10:29:38 -05:00
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:31:34
|
2022-10-03 10:29:38 -05:00
|
|
|
|
|
|
|
|
LL | let _string_default = outer!(Box::new(String::from("")));
|
2023-01-03 17:44:20 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<String>::default()`
|
2022-10-03 10:29:38 -05:00
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:32:46
|
2022-10-03 10:29:38 -05:00
|
|
|
|
|
|
|
|
LL | let _vec2: Box<Vec<ImplementsDefault>> = Box::new(vec![]);
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `Box::default()`
|
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:33:33
|
2022-10-03 10:29:38 -05:00
|
|
|
|
|
|
|
|
LL | let _vec3: Box<Vec<bool>> = Box::new(Vec::from([]));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::default()`
|
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:34:25
|
2022-10-03 10:29:38 -05:00
|
|
|
|
|
|
|
|
LL | let _vec4: Box<_> = Box::new(Vec::from([false; 0]));
|
2023-01-03 17:44:20 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<Vec<bool>>::default()`
|
2022-10-03 10:29:38 -05:00
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-03 13:07:02 -05:00
|
|
|
--> $DIR/box_default.rs:36:16
|
2022-10-03 10:29:38 -05:00
|
|
|
|
|
|
|
|
LL | call_ty_fn(Box::new(u8::default()));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::default()`
|
|
|
|
|
|
|
|
error: `Box::new(_)` of default value
|
2023-05-18 07:33:52 -05:00
|
|
|
--> $DIR/box_default.rs:48:5
|
2022-09-21 16:43:49 -05:00
|
|
|
|
|
2022-10-03 10:29:38 -05:00
|
|
|
LL | Box::new(bool::default())
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<bool>::default()`
|
2022-09-21 16:43:49 -05:00
|
|
|
|
2022-10-10 06:05:07 -05:00
|
|
|
error: `Box::new(_)` of default value
|
2023-05-18 07:33:52 -05:00
|
|
|
--> $DIR/box_default.rs:65:28
|
2022-10-10 06:05:07 -05:00
|
|
|
|
|
|
|
|
LL | let _: Box<dyn Read> = Box::new(ImplementsDefault::default());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<ImplementsDefault>::default()`
|
|
|
|
|
2023-01-08 13:25:42 -06:00
|
|
|
error: `Box::new(_)` of default value
|
2023-05-18 07:33:52 -05:00
|
|
|
--> $DIR/box_default.rs:74:17
|
2023-01-08 13:25:42 -06:00
|
|
|
|
|
|
|
|
LL | let _ = Box::new(WeirdPathed::default());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<WeirdPathed>::default()`
|
|
|
|
|
2023-02-19 12:25:53 -06:00
|
|
|
error: `Box::new(_)` of default value
|
2023-05-18 07:33:52 -05:00
|
|
|
--> $DIR/box_default.rs:86:18
|
2023-02-19 12:25:53 -06:00
|
|
|
|
|
|
|
|
LL | Some(Box::new(Foo::default()))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Box::<Foo>::default()`
|
|
|
|
|
|
|
|
error: aborting due to 16 previous errors
|
2022-09-21 16:43:49 -05:00
|
|
|
|