-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unreachable panics from VecDeque::{front/back}[_mut] #80834
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Maybe call the test file |
@LingMan you are of course right, thank you. |
@bors r+ |
📌 Commit a398106 has been approved by |
Remove unreachable panics from VecDeque::{front/back}[_mut] `VecDeque`'s `front`, `front_mut`, `back` and `back_mut` methods are implemented in terms of the index operator, which causes these functions to contain [unreachable panic calls](https://rust.godbolt.org/z/MTnq1o). This PR reimplements these methods in terms of `get[_mut]` instead.
Remove unreachable panics from VecDeque::{front/back}[_mut] `VecDeque`'s `front`, `front_mut`, `back` and `back_mut` methods are implemented in terms of the index operator, which causes these functions to contain [unreachable panic calls](https://rust.godbolt.org/z/MTnq1o). This PR reimplements these methods in terms of `get[_mut]` instead.
Remove unreachable panics from VecDeque::{front/back}[_mut] `VecDeque`'s `front`, `front_mut`, `back` and `back_mut` methods are implemented in terms of the index operator, which causes these functions to contain [unreachable panic calls](https://rust.godbolt.org/z/MTnq1o). This PR reimplements these methods in terms of `get[_mut]` instead.
@bors r- This failed in #81002: The job Click to see the possible cause of the failure (guessed by this bot)
|
I am reasonably sure the failure is caused by a debug_assert in |
@bors r=oli-obk |
📌 Commit 744f885 has been approved by |
Remove unreachable panics from VecDeque::{front/back}[_mut] `VecDeque`'s `front`, `front_mut`, `back` and `back_mut` methods are implemented in terms of the index operator, which causes these functions to contain [unreachable panic calls](https://rust.godbolt.org/z/MTnq1o). This PR reimplements these methods in terms of `get[_mut]` instead.
Rollup of 5 pull requests Successful merges: - rust-lang#80254 (Don't try to add nested predicate to Rustdoc auto-trait `ParamEnv`) - rust-lang#80834 (Remove unreachable panics from VecDeque::{front/back}[_mut]) - rust-lang#80944 (Use Option::map_or instead of `.map(..).unwrap_or(..)`) - rust-lang#81008 (Don't ICE when computing a layout of a generator tainted by errors) - rust-lang#81023 (Remove doctree::Variant) Failed merges: - rust-lang#81033 (Remove useless `clean::Variant` struct) r? `@ghost` `@rustbot` modify labels: rollup
VecDeque
'sfront
,front_mut
,back
andback_mut
methods are implemented in terms of the index operator, which causes these functions to contain unreachable panic calls.This PR reimplements these methods in terms of
get[_mut]
instead.