-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Commit 17c94b5
authored
Rollup merge of #123089 - Philippe-Cholet:vecdeque_pop_assume_cap, r=Nilstrieb
Add invariant to VecDeque::pop_* that len < cap if pop successful
Similar to #114370 for VecDeque instead of Vec.
I initially come from rust-itertools/itertools#899 where we noticed that `pop_front;push_back;` was slower than expected so `@scottmcm` suggested I file an issue which lead to https://internals.rust-lang.org/t/vecdeque-pop-front-push-back/20483 where **kornel** mentionned #114334 (fixed by #114370).
This is my first time with codegen tests, I based the test on what was done for Vec.File tree
2 files changed
+75
-2
lines changed- library/alloc/src/collections/vec_deque
- tests/codegen
2 files changed
+75
-2
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1614 | 1614 |
| |
1615 | 1615 |
| |
1616 | 1616 |
| |
1617 | - | ||
1617 | + | ||
1618 | + | ||
1619 | + | ||
1620 | + | ||
1618 | 1621 |
| |
1619 | 1622 |
| |
1620 | 1623 |
| |
| |||
1638 | 1641 |
| |
1639 | 1642 |
| |
1640 | 1643 |
| |
1641 | - | ||
1644 | + | ||
1645 | + | ||
1646 | + | ||
1647 | + | ||
1642 | 1648 |
| |
1643 | 1649 |
| |
1644 | 1650 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | ||
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
66 | + | ||
67 | + |
0 commit comments