Bound checking elided for [index]
but not for [..index]
#73396
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code: https://rust.godbolt.org/z/ihbmwB
I expected to see this happen: There is no bound check for
s[..idx]
in line 3.Instead, this happened: There is bound check.
Note using
s[idx]
bound check is elided:cc #30112
Meta
rustc --version --verbose
: rustc 1.46.0-nightly (4fb54ed 2020-06-14)The text was updated successfully, but these errors were encountered: