Put slicing syntax behind a feature gate.

[breaking-change]

If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
This commit is contained in:
Nick Cameron 2014-09-26 17:48:16 +12:00
parent df2f1fa768
commit 95cfc35607
43 changed files with 105 additions and 43 deletions

View file

@ -160,7 +160,7 @@ impl String {
if i > 0 {
unsafe {
res.as_mut_vec().push_all(v.[..i])
res.as_mut_vec().push_all(v[..i])
};
}
@ -177,7 +177,7 @@ impl String {
macro_rules! error(() => ({
unsafe {
if subseqidx != i_ {
res.as_mut_vec().push_all(vv[subseqidx..i_]);
res.as_mut_vec().push_all(v[subseqidx..i_]);
}
subseqidx = i;
res.as_mut_vec().push_all(REPLACEMENT);