Range<usize>::next
should fully MIR-inline
#130590
Labels
A-MIR
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.html
A-mir-opt-inlining
Area: MIR inlining
C-optimization
Category: An issue highlighting optimization opportunities or PRs implementing such
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
If you compile this to optimized MIR:
https://rust.godbolt.org/z/zsh6b6Y8n
You'll see that it still contains a call to
forward_unchecked
:That's pretty unfortunate, because
forward_unchecked(a, 1)
is justAddUnchecked(a, 1)
, a single MIR operator.The text was updated successfully, but these errors were encountered: