]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/redundant_allocation.stderr
Auto merge of #97191 - wesleywiser:main_thread_name, r=ChrisDenton
[rust.git] / src / tools / clippy / tests / ui / redundant_allocation.stderr
index c3b10e5f5e679df879418117c4840aa6268b07dd..fab1b069fcbc72462394b367508cb6f34137c22d 100644 (file)
@@ -143,5 +143,41 @@ LL |     pub fn test_rc_box(_: Rc<Box<Box<dyn T>>>) {}
    = note: `Box<Box<dyn T>>` is already on the heap, `Rc<Box<Box<dyn T>>>` makes an extra allocation
    = help: consider using just `Rc<Box<dyn T>>` or `Box<Box<dyn T>>`
 
-error: aborting due to 16 previous errors
+error: usage of `Rc<Box<Box<str>>>`
+  --> $DIR/redundant_allocation.rs:129:31
+   |
+LL |     pub fn test_rc_box_str(_: Rc<Box<Box<str>>>) {}
+   |                               ^^^^^^^^^^^^^^^^^
+   |
+   = note: `Box<Box<str>>` is already on the heap, `Rc<Box<Box<str>>>` makes an extra allocation
+   = help: consider using just `Rc<Box<str>>` or `Box<Box<str>>`
+
+error: usage of `Rc<Box<Box<[usize]>>>`
+  --> $DIR/redundant_allocation.rs:130:33
+   |
+LL |     pub fn test_rc_box_slice(_: Rc<Box<Box<[usize]>>>) {}
+   |                                 ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `Box<Box<[usize]>>` is already on the heap, `Rc<Box<Box<[usize]>>>` makes an extra allocation
+   = help: consider using just `Rc<Box<[usize]>>` or `Box<Box<[usize]>>`
+
+error: usage of `Rc<Box<Box<Path>>>`
+  --> $DIR/redundant_allocation.rs:131:32
+   |
+LL |     pub fn test_rc_box_path(_: Rc<Box<Box<Path>>>) {}
+   |                                ^^^^^^^^^^^^^^^^^^
+   |
+   = note: `Box<Box<Path>>` is already on the heap, `Rc<Box<Box<Path>>>` makes an extra allocation
+   = help: consider using just `Rc<Box<Path>>` or `Box<Box<Path>>`
+
+error: usage of `Rc<Box<Box<DynSized>>>`
+  --> $DIR/redundant_allocation.rs:132:34
+   |
+LL |     pub fn test_rc_box_custom(_: Rc<Box<Box<DynSized>>>) {}
+   |                                  ^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `Box<Box<DynSized>>` is already on the heap, `Rc<Box<Box<DynSized>>>` makes an extra allocation
+   = help: consider using just `Rc<Box<DynSized>>` or `Box<Box<DynSized>>`
+
+error: aborting due to 20 previous errors