From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- .../clippy/tests/ui/redundant_allocation.stderr | 183 +++++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 src/tools/clippy/tests/ui/redundant_allocation.stderr (limited to 'src/tools/clippy/tests/ui/redundant_allocation.stderr') diff --git a/src/tools/clippy/tests/ui/redundant_allocation.stderr b/src/tools/clippy/tests/ui/redundant_allocation.stderr new file mode 100644 index 000000000..fab1b069f --- /dev/null +++ b/src/tools/clippy/tests/ui/redundant_allocation.stderr @@ -0,0 +1,183 @@ +error: usage of `Box>` + --> $DIR/redundant_allocation.rs:25:30 + | +LL | pub fn box_test6(foo: Box>) {} + | ^^^^^^^^^^ + | + = note: `-D clippy::redundant-allocation` implied by `-D warnings` + = note: `Rc` is already on the heap, `Box>` makes an extra allocation + = help: consider using just `Box` or `Rc` + +error: usage of `Box>` + --> $DIR/redundant_allocation.rs:27:30 + | +LL | pub fn box_test7(foo: Box>) {} + | ^^^^^^^^^^^ + | + = note: `Arc` is already on the heap, `Box>` makes an extra allocation + = help: consider using just `Box` or `Arc` + +error: usage of `Box>>` + --> $DIR/redundant_allocation.rs:29:27 + | +LL | pub fn box_test8() -> Box>> { + | ^^^^^^^^^^^^^^^^^^^^ + | + = note: `Rc>` is already on the heap, `Box>>` makes an extra allocation + = help: consider using just `Box>` or `Rc>` + +error: usage of `Box>` + --> $DIR/redundant_allocation.rs:33:30 + | +LL | pub fn box_test9(foo: Box>) -> Box>> { + | ^^^^^^^^^^^ + | + = note: `Arc` is already on the heap, `Box>` makes an extra allocation + = help: consider using just `Box` or `Arc` + +error: usage of `Box>>` + --> $DIR/redundant_allocation.rs:33:46 + | +LL | pub fn box_test9(foo: Box>) -> Box>> { + | ^^^^^^^^^^^^^^^^^ + | + = note: `Arc>` is already on the heap, `Box>>` makes an extra allocation + = help: consider using just `Box>` or `Arc>` + +error: usage of `Rc>` + --> $DIR/redundant_allocation.rs:46:24 + | +LL | pub fn rc_test5(a: Rc>) {} + | ^^^^^^^^^^^^^ + | + = note: `Box` is already on the heap, `Rc>` makes an extra allocation + = help: consider using just `Rc` or `Box` + +error: usage of `Rc>` + --> $DIR/redundant_allocation.rs:48:24 + | +LL | pub fn rc_test7(a: Rc>) {} + | ^^^^^^^^^^^^^ + | + = note: `Arc` is already on the heap, `Rc>` makes an extra allocation + = help: consider using just `Rc` or `Arc` + +error: usage of `Rc>>` + --> $DIR/redundant_allocation.rs:50:26 + | +LL | pub fn rc_test8() -> Rc>> { + | ^^^^^^^^^^^^^^^^^^^^ + | + = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation + = help: consider using just `Rc>` or `Box>` + +error: usage of `Rc>` + --> $DIR/redundant_allocation.rs:54:29 + | +LL | pub fn rc_test9(foo: Rc>) -> Rc>> { + | ^^^^^^^^^^ + | + = note: `Arc` is already on the heap, `Rc>` makes an extra allocation + = help: consider using just `Rc` or `Arc` + +error: usage of `Rc>>` + --> $DIR/redundant_allocation.rs:54:44 + | +LL | pub fn rc_test9(foo: Rc>) -> Rc>> { + | ^^^^^^^^^^^^^^^^ + | + = note: `Arc>` is already on the heap, `Rc>>` makes an extra allocation + = help: consider using just `Rc>` or `Arc>` + +error: usage of `Arc>` + --> $DIR/redundant_allocation.rs:67:25 + | +LL | pub fn arc_test5(a: Arc>) {} + | ^^^^^^^^^^^^^^ + | + = note: `Box` is already on the heap, `Arc>` makes an extra allocation + = help: consider using just `Arc` or `Box` + +error: usage of `Arc>` + --> $DIR/redundant_allocation.rs:69:25 + | +LL | pub fn arc_test6(a: Arc>) {} + | ^^^^^^^^^^^^^ + | + = note: `Rc` is already on the heap, `Arc>` makes an extra allocation + = help: consider using just `Arc` or `Rc` + +error: usage of `Arc>>` + --> $DIR/redundant_allocation.rs:71:27 + | +LL | pub fn arc_test8() -> Arc>> { + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `Box>` is already on the heap, `Arc>>` makes an extra allocation + = help: consider using just `Arc>` or `Box>` + +error: usage of `Arc>` + --> $DIR/redundant_allocation.rs:75:30 + | +LL | pub fn arc_test9(foo: Arc>) -> Arc>> { + | ^^^^^^^^^^ + | + = note: `Rc` is already on the heap, `Arc>` makes an extra allocation + = help: consider using just `Arc` or `Rc` + +error: usage of `Arc>>` + --> $DIR/redundant_allocation.rs:75:45 + | +LL | pub fn arc_test9(foo: Arc>) -> Arc>> { + | ^^^^^^^^^^^^^^^^ + | + = note: `Rc>` is already on the heap, `Arc>>` makes an extra allocation + = help: consider using just `Arc>` or `Rc>` + +error: usage of `Rc>>` + --> $DIR/redundant_allocation.rs:97:27 + | +LL | pub fn test_rc_box(_: Rc>>) {} + | ^^^^^^^^^^^^^^^^^^^ + | + = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation + = help: consider using just `Rc>` or `Box>` + +error: usage of `Rc>>` + --> $DIR/redundant_allocation.rs:129:31 + | +LL | pub fn test_rc_box_str(_: Rc>>) {} + | ^^^^^^^^^^^^^^^^^ + | + = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation + = help: consider using just `Rc>` or `Box>` + +error: usage of `Rc>>` + --> $DIR/redundant_allocation.rs:130:33 + | +LL | pub fn test_rc_box_slice(_: Rc>>) {} + | ^^^^^^^^^^^^^^^^^^^^^ + | + = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation + = help: consider using just `Rc>` or `Box>` + +error: usage of `Rc>>` + --> $DIR/redundant_allocation.rs:131:32 + | +LL | pub fn test_rc_box_path(_: Rc>>) {} + | ^^^^^^^^^^^^^^^^^^ + | + = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation + = help: consider using just `Rc>` or `Box>` + +error: usage of `Rc>>` + --> $DIR/redundant_allocation.rs:132:34 + | +LL | pub fn test_rc_box_custom(_: Rc>>) {} + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `Box>` is already on the heap, `Rc>>` makes an extra allocation + = help: consider using just `Rc>` or `Box>` + +error: aborting due to 20 previous errors + -- cgit v1.2.3