Fix range performance regression
A recent change to the implementation of range iterators meant that, even when stepping by 1, the iterators *always* involved checked arithmetic. This commit reverts to the earlier behavior (while retaining the refactoring into traits). Fixes #24095 cc #24014
This commit is contained in:
parent
9f37ba64e8
commit
dddcbcfeac
2 changed files with 24 additions and 24 deletions
|
|
@ -19,6 +19,7 @@ pub fn main() {
|
|||
for i in false..true {}
|
||||
//~^ ERROR the trait
|
||||
//~^^ ERROR the trait
|
||||
//~^^^ ERROR the trait
|
||||
|
||||
// Unsized type.
|
||||
let arr: &[_] = &[1, 2, 3];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue