diff options
| author | bors <bors@rust-lang.org> | 2017-01-03 23:51:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-01-03 23:51:42 +0000 |
| commit | 468227129d08b52c4cf90313b29fdad1b80e596b (patch) | |
| tree | 395f940c4de2fd358f5777c4f28b867a4174e2b6 /src/rustllvm/RustWrapper.cpp | |
| parent | 8f62c2920077eb5cb81323142fc5dbe6ae8813c0 (diff) | |
| parent | d83fff3b3b9dd0fd6eef862e97f883d171367041 (diff) | |
| download | rust-468227129d08b52c4cf90313b29fdad1b80e596b.tar.gz rust-468227129d08b52c4cf90313b29fdad1b80e596b.zip | |
Auto merge of #38066 - bluss:string-slice-error, r=sfackler
Use more specific panic message for &str slicing errors
Separate out of bounds errors from character boundary errors, and print
more details for character boundary errors.
It reports the first error it finds in:
1. begin out of bounds
2. end out of bounds
3. begin <= end violated
3. begin not char boundary
5. end not char boundary.
Example:
&"abcαβγ"[..4]
thread 'str::test_slice_fail_boundary_1' panicked at 'byte index 4 is not
a char boundary; it is inside 'α' (bytes 3..5) of `abcαβγ`'
Fixes #38052
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
