Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test
  • Loading branch information
kyoto7250 authored and chansuke committed Apr 11, 2023
commit 47e916fab2e6f8931fc218c5d4edf9a0f9452d9e
12 changes: 6 additions & 6 deletions tests/ui/unnecessary_reserve.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: this `reserve` no longer makes sense in rustc version >= 1.62
error: unnecessary call to `reserve`
--> $DIR/unnecessary_reserve.rs:20:5
|
LL | vec.reserve(1);
Expand All @@ -8,39 +8,39 @@ LL | vec.extend([1]);
|
= note: `-D clippy::unnecessary-reserve` implied by `-D warnings`

error: this `reserve` no longer makes sense in rustc version >= 1.62
error: unnecessary call to `reserve`
--> $DIR/unnecessary_reserve.rs:24:5
|
LL | vec.reserve(array.len());
| ------------------------ help: remove this line
LL | vec.extend(array);
| ^^^^^^^^^^^^^^^^^^

error: this `reserve` no longer makes sense in rustc version >= 1.62
error: unnecessary call to `reserve`
--> $DIR/unnecessary_reserve.rs:29:9
|
LL | vec.reserve(1);
| -------------- help: remove this line
LL | vec.extend([1])
| ^^^^^^^^^^^^^^^

error: this `reserve` no longer makes sense in rustc version >= 1.62
error: unnecessary call to `reserve`
--> $DIR/unnecessary_reserve.rs:49:5
|
LL | vec_deque.reserve(1);
| -------------------- help: remove this line
LL | vec_deque.extend([1]);
| ^^^^^^^^^^^^^^^^^^^^^^

error: this `reserve` no longer makes sense in rustc version >= 1.62
error: unnecessary call to `reserve`
--> $DIR/unnecessary_reserve.rs:53:5
|
LL | vec_deque.reserve(array.len());
| ------------------------------ help: remove this line
LL | vec_deque.extend(array);
| ^^^^^^^^^^^^^^^^^^^^^^^^

error: this `reserve` no longer makes sense in rustc version >= 1.62
error: unnecessary call to `reserve`
--> $DIR/unnecessary_reserve.rs:58:9
|
LL | vec_deque.reserve(1);
Expand Down