about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/common/backtrace.rs16
-rw-r--r--src/libstd/sys/unix/process.rs4
-rw-r--r--src/libstd/sys/windows/fs.rs2
-rw-r--r--src/libstd/sys/windows/os.rs2
4 files changed, 12 insertions, 12 deletions
diff --git a/src/libstd/sys/common/backtrace.rs b/src/libstd/sys/common/backtrace.rs
index d8b85987236..d069d9ee3b8 100644
--- a/src/libstd/sys/common/backtrace.rs
+++ b/src/libstd/sys/common/backtrace.rs
@@ -42,10 +42,10 @@ pub fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> {
     let mut valid = true;
     let mut inner = s;
     if s.len() > 4 && s.starts_with("_ZN") && s.ends_with("E") {
-        inner = s.slice(3, s.len() - 1);
+        inner = &s[3 .. s.len() - 1];
     // On Windows, dbghelp strips leading underscores, so we accept "ZN...E" form too.
     } else if s.len() > 3 && s.starts_with("ZN") && s.ends_with("E") {
-        inner = s.slice(2, s.len() - 1);
+        inner = &s[2 .. s.len() - 1];
     } else {
         valid = false;
     }
@@ -83,11 +83,11 @@ pub fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> {
             }
             let mut rest = inner;
             while rest.char_at(0).is_numeric() {
-                rest = rest.slice_from(1);
+                rest = &rest[1..];
             }
-            let i: uint = inner.slice_to(inner.len() - rest.len()).parse().unwrap();
-            inner = rest.slice_from(i);
-            rest = rest.slice_to(i);
+            let i: uint = inner[.. (inner.len() - rest.len())].parse().unwrap();
+            inner = &rest[i..];
+            rest = &rest[..i];
             while rest.len() > 0 {
                 if rest.starts_with("$") {
                     macro_rules! demangle {
@@ -128,8 +128,8 @@ pub fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> {
                         None => rest.len(),
                         Some(i) => i,
                     };
-                    try!(writer.write_str(rest.slice_to(idx)));
-                    rest = rest.slice_from(idx);
+                    try!(writer.write_str(&rest[..idx]));
+                    rest = &rest[idx..];
                 }
             }
         }
diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs
index 36bf696dba5..46639d7d8f0 100644
--- a/src/libstd/sys/unix/process.rs
+++ b/src/libstd/sys/unix/process.rs
@@ -125,9 +125,9 @@ impl Process {
                     let mut bytes = [0; 8];
                     return match input.read(&mut bytes) {
                         Ok(8) => {
-                            assert!(combine(CLOEXEC_MSG_FOOTER) == combine(bytes.slice(4, 8)),
+                            assert!(combine(CLOEXEC_MSG_FOOTER) == combine(&bytes[4.. 8]),
                                 "Validation on the CLOEXEC pipe failed: {:?}", bytes);
-                            let errno = combine(bytes.slice(0, 4));
+                            let errno = combine(&bytes[0.. 4]);
                             assert!(p.wait(0).is_ok(), "wait(0) should either return Ok or panic");
                             Err(super::decode_error(errno))
                         }
diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs
index a7330f7c67c..cb8ef7eb66b 100644
--- a/src/libstd/sys/windows/fs.rs
+++ b/src/libstd/sys/windows/fs.rs
@@ -376,7 +376,7 @@ pub fn readlink(p: &Path) -> IoResult<Path> {
     });
     let ret = match ret {
         Some(ref s) if s.starts_with(r"\\?\") => { // "
-            Ok(Path::new(s.slice_from(4)))
+            Ok(Path::new(&s[4..]))
         }
         Some(s) => Ok(Path::new(s)),
         None => Err(super::last_error()),
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs
index e9490dc95c9..36dc9b2afe4 100644
--- a/src/libstd/sys/windows/os.rs
+++ b/src/libstd/sys/windows/os.rs
@@ -146,7 +146,7 @@ pub fn fill_utf16_buf_and_decode<F>(mut f: F) -> Option<String> where
                 done = true;
             }
             if k != 0 && done {
-                let sub = buf.slice(0, k as uint);
+                let sub = &buf[.. (k as uint)];
                 // We want to explicitly catch the case when the
                 // closure returned invalid UTF-16, rather than
                 // set `res` to None and continue.