Skip to content

Commit 3e9e2ca

Browse files
committed
---
yaml --- r: 123443 b: refs/heads/auto c: 3c7f619 h: refs/heads/master i: 123441: 7824b8d 123439: 31b6a60 v: v3
1 parent 218a17e commit 3e9e2ca

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: c2dd553bed572368953801dd1d339013f58b53d6
16+
refs/heads/auto: 3c7f619b76b87c400e270eebfa7625844afcd673
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libcore/str.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,7 +1764,9 @@ impl<'a> StrSlice<'a> for &'a str {
17641764

17651765
#[inline]
17661766
fn slice(&self, begin: uint, end: uint) -> &'a str {
1767-
assert!(self.is_char_boundary(begin) && self.is_char_boundary(end));
1767+
assert!(self.is_char_boundary(begin) && self.is_char_boundary(end),
1768+
"index {} and/or {} in `{}` do not lie on character boundary", begin,
1769+
end, *self);
17681770
unsafe { raw::slice_bytes(*self, begin, end) }
17691771
}
17701772

@@ -1775,7 +1777,8 @@ impl<'a> StrSlice<'a> for &'a str {
17751777

17761778
#[inline]
17771779
fn slice_to(&self, end: uint) -> &'a str {
1778-
assert!(self.is_char_boundary(end));
1780+
assert!(self.is_char_boundary(end), "index {} in `{}` does not lie on \
1781+
a character boundary", end, *self);
17791782
unsafe { raw::slice_bytes(*self, 0, end) }
17801783
}
17811784

0 commit comments

Comments
 (0)