Auto merge of #148944 - theemathas:rm_inherit_overflow, r=joboet
Remove `rustc_inherit_overflow_checks` from `position()` in slice iterators This method implementation can never cause an overflow, since `i` can never go over the slice's length.
This commit is contained in:
commit
b6d7ff3aa7
1 changed files with 0 additions and 1 deletions
|
|
@ -350,7 +350,6 @@ macro_rules! iterator {
|
|||
// because this simple implementation generates less LLVM IR and is
|
||||
// faster to compile. Also, the `assume` avoids a bounds check.
|
||||
#[inline]
|
||||
#[rustc_inherit_overflow_checks]
|
||||
fn position<P>(&mut self, mut predicate: P) -> Option<usize> where
|
||||
Self: Sized,
|
||||
P: FnMut(Self::Item) -> bool,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue