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 --- src/tools/clippy/tests/ui/box_collection.stderr | 75 +++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 src/tools/clippy/tests/ui/box_collection.stderr (limited to 'src/tools/clippy/tests/ui/box_collection.stderr') diff --git a/src/tools/clippy/tests/ui/box_collection.stderr b/src/tools/clippy/tests/ui/box_collection.stderr new file mode 100644 index 000000000..2b28598de --- /dev/null +++ b/src/tools/clippy/tests/ui/box_collection.stderr @@ -0,0 +1,75 @@ +error: you seem to be trying to use `Box>`. Consider using just `Vec<..>` + --> $DIR/box_collection.rs:21:15 + | +LL | fn test1(foo: Box>) {} + | ^^^^^^^^^^^^^^ + | + = note: `-D clippy::box-collection` implied by `-D warnings` + = help: `Vec<..>` is already on the heap, `Box>` makes an extra allocation + +error: you seem to be trying to use `Box`. Consider using just `String` + --> $DIR/box_collection.rs:28:15 + | +LL | fn test3(foo: Box) {} + | ^^^^^^^^^^^ + | + = help: `String` is already on the heap, `Box` makes an extra allocation + +error: you seem to be trying to use `Box>`. Consider using just `HashMap<..>` + --> $DIR/box_collection.rs:30:15 + | +LL | fn test4(foo: Box>) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: `HashMap<..>` is already on the heap, `Box>` makes an extra allocation + +error: you seem to be trying to use `Box>`. Consider using just `HashSet<..>` + --> $DIR/box_collection.rs:32:15 + | +LL | fn test5(foo: Box>) {} + | ^^^^^^^^^^^^^^^^^ + | + = help: `HashSet<..>` is already on the heap, `Box>` makes an extra allocation + +error: you seem to be trying to use `Box>`. Consider using just `VecDeque<..>` + --> $DIR/box_collection.rs:34:15 + | +LL | fn test6(foo: Box>) {} + | ^^^^^^^^^^^^^^^^^^ + | + = help: `VecDeque<..>` is already on the heap, `Box>` makes an extra allocation + +error: you seem to be trying to use `Box>`. Consider using just `LinkedList<..>` + --> $DIR/box_collection.rs:36:15 + | +LL | fn test7(foo: Box>) {} + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: `LinkedList<..>` is already on the heap, `Box>` makes an extra allocation + +error: you seem to be trying to use `Box>`. Consider using just `BTreeMap<..>` + --> $DIR/box_collection.rs:38:15 + | +LL | fn test8(foo: Box>) {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: `BTreeMap<..>` is already on the heap, `Box>` makes an extra allocation + +error: you seem to be trying to use `Box>`. Consider using just `BTreeSet<..>` + --> $DIR/box_collection.rs:40:15 + | +LL | fn test9(foo: Box>) {} + | ^^^^^^^^^^^^^^^^^^ + | + = help: `BTreeSet<..>` is already on the heap, `Box>` makes an extra allocation + +error: you seem to be trying to use `Box>`. Consider using just `BinaryHeap<..>` + --> $DIR/box_collection.rs:42:16 + | +LL | fn test10(foo: Box>) {} + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: `BinaryHeap<..>` is already on the heap, `Box>` makes an extra allocation + +error: aborting due to 9 previous errors + -- cgit v1.2.3