Commit 18c2dcc
authored
Rollup merge of rust-lang#123089 - Philippe-Cholet:vecdeque_pop_assume_cap, r=Nilstrieb
Add invariant to VecDeque::pop_* that len < cap if pop successful
Similar to rust-lang#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 rust-lang#114334 (fixed by rust-lang#114370).
This is my first time with codegen tests, I based the test on what was done for Vec.1 file changed
+8
-2
lines changed| Original 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 | | |
| |||
0 commit comments