about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-01-28 10:41:34 +0000
committerbors <bors@rust-lang.org>2018-01-28 10:41:34 +0000
commit0119b44270243db7479ea946bb0cdd5522c351b6 (patch)
tree9fba28fff4620615ab62b95014a4f78646033842 /src/rustllvm/RustWrapper.cpp
parent7046a406232695b581579f8e2468601260ea2199 (diff)
parent4f7109a42482e266410b23fedc9643a6d76e5fa5 (diff)
downloadrust-0119b44270243db7479ea946bb0cdd5522c351b6.tar.gz
rust-0119b44270243db7479ea946bb0cdd5522c351b6.zip
Auto merge of #47772 - arthurprs:iter-position-bounds-check, r=dtolnay
Use the slice length to hint the optimizer about iter.position result

Using the len of the iterator doesn't give the same result.
That's also why we can't generalize it to all TrustedLen iterators.

Problem demo: https://godbolt.org/g/MXg2ae
Fix demo: https://godbolt.org/g/P8q5aZ

Second attempt of #47333
Third attempt of #45501
Fixes #45964
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions