about summary refs log tree commit diff
path: root/src/libsyntax/errors
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-03-26 09:07:22 +0530
committerManish Goregaokar <manishsmail@gmail.com>2016-03-26 13:42:04 +0530
commit671027817c6ef7351db6dbb47cfac42cf5f0707a (patch)
tree14bd20964129c705112fb078874230aaf5419fad /src/libsyntax/errors
parent023fae61751a572f722b59ef78862878580f204d (diff)
parentf621193e5ea7ac54fcd37f0e730e955fd9f61200 (diff)
downloadrust-671027817c6ef7351db6dbb47cfac42cf5f0707a.tar.gz
rust-671027817c6ef7351db6dbb47cfac42cf5f0707a.zip
Rollup merge of #32456 - bluss:str-zero, r=alexcrichton
Hardcode accepting 0 as a valid str char boundary

If we check explicitly for index == 0, that removes the need to read the
byte at index 0, so it avoids a trip to the string's memory, and it
optimizes out the slicing index' bounds check whenever it is (a constant) zero.
Diffstat (limited to 'src/libsyntax/errors')
0 files changed, 0 insertions, 0 deletions