rust/src/libcore
bors 468227129d 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
2017-01-03 23:51:42 +00:00
..
fmt 40 -> 39, as ceil(log10(2^128)) == 39 2016-12-30 15:17:28 +01:00
hash Such large. Very 128. Much bits. 2016-12-30 15:15:44 +01:00
iter Auto merge of #38713 - clarcharr:trusted_len, r=brson 2017-01-01 05:39:16 +00:00
num Fix rebase fallout 2016-12-30 15:17:27 +01:00
prelude Run rustfmt on libcore/prelude folder 2016-10-16 22:13:04 +05:30
str Auto merge of #38066 - bluss:string-slice-error, r=sfackler 2017-01-03 23:51:42 +00:00
sync Rollup merge of #38674 - GuillaumeGomez:atomic_fn_docs, r=frewsxcv 2016-12-29 17:26:38 -08:00
any.rs Add stable example to TypeId 2016-10-17 17:49:07 -07:00
array.rs std: Correct stability attributes for some implementations 2016-10-01 23:58:14 +01:00
borrow.rs Use #[prelude_import] in libcore. 2016-08-24 22:12:23 +00:00
Cargo.toml Fallout from updating bootstrap Cargo 2016-12-29 08:47:26 -08:00
cell.rs Address fallout 2016-12-16 19:42:17 -08:00
char.rs Stabilize std::char::{encode_utf8, encode_utf16} 2016-12-15 10:56:55 -08:00
char_private.rs Fix fmt::Debug for strings, e.g. for Chinese characters 2016-11-18 14:45:59 +01:00
clone.rs Such large. Very 128. Much bits. 2016-12-30 15:15:44 +01:00
cmp.rs Such large. Very 128. Much bits. 2016-12-30 15:15:44 +01:00
convert.rs Fix a few links in the docs 2016-10-21 00:49:47 +01:00
default.rs Such large. Very 128. Much bits. 2016-12-30 15:15:44 +01:00
internal_macros.rs Implement ops on &Wrapping<T> 2016-10-23 14:29:37 +01:00
intrinsics.rs Add documentation for some of the add/sub/mul intrinsics 2016-11-08 22:03:27 -05:00
iter_private.rs Expand .zip() specialization to .map() and .cloned() 2016-10-17 10:58:21 +02:00
lib.rs Feature gate the 128 bit types 2016-12-30 15:17:25 +01:00
macros.rs Fix invalid src url 2016-11-12 00:30:53 +01:00
marker.rs Add missing urls for marker's traits 2016-11-10 23:13:37 +01:00
mem.rs Add missing urls for mem module 2016-11-11 18:50:54 +01:00
nonzero.rs Such large. Very 128. Much bits. 2016-12-30 15:15:44 +01:00
ops.rs Such large. Very 128. Much bits. 2016-12-30 15:15:44 +01:00
option.rs Add cloned example for Option 2016-11-30 09:44:33 -08:00
panicking.rs Mark all extern functions as nounwind 2015-09-14 11:36:09 +02:00
ptr.rs Implement RFC #1725 2016-12-12 21:44:09 -08:00
raw.rs Clean up std::raw docs 2016-08-05 17:52:37 -04:00
result.rs doc: Explain meaning of Result iters and link to factory functions. 2016-12-13 11:28:58 -08:00
slice.rs Add links to methods on all slice iterator struct docs 2016-12-30 13:55:38 -05:00
tuple.rs Remove macro work-around. 2016-11-12 12:47:13 -07:00