@@ -118,13 +118,41 @@ LL +     let _ = Box::new_zeroed();
118118LL -     let _ = Box {};
119119LL +     let _ = Box::new_in(_, _);
120120   |
121-    = and 12  other candidates
121+    = and 13  other candidates
122122help: consider using the `Default` trait
123123   |
124124LL -     let _ = Box {};
125125LL +     let _ = <Box as std::default::Default>::default();
126126   |
127127
128- error: aborting due to 4 previous errors
128+ error: cannot construct `Box<i32>` with struct literal syntax due to private fields
129+   --> $DIR/suggest-box-new.rs:21:13
130+    |
131+ LL |     let _ = Box::<i32> {};
132+    |             ^^^^^^^^^^
133+    |
134+    = note: private fields `0` and `1` that were not provided
135+ help: you might have meant to use an associated function to build this type
136+    |
137+ LL -     let _ = Box::<i32> {};
138+ LL +     let _ = Box::<i32>::new(_);
139+    |
140+ LL -     let _ = Box::<i32> {};
141+ LL +     let _ = Box::<i32>::new_in(_, _);
142+    |
143+ LL -     let _ = Box::<i32> {};
144+ LL +     let _ = Box::<i32>::into_inner(_);
145+    |
146+ LL -     let _ = Box::<i32> {};
147+ LL +     let _ = Box::<i32>::write(_, _);
148+    |
149+    = and 4 other candidates
150+ help: consider using the `Default` trait
151+    |
152+ LL -     let _ = Box::<i32> {};
153+ LL +     let _ = <Box::<i32> as std::default::Default>::default();
154+    |
155+ 
156+ error: aborting due to 5 previous errors
129157
130158For more information about this error, try `rustc --explain E0423`.
0 commit comments