]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/session/search_paths.rs
Fallout from stabilization.
[rust.git] / src / librustc / session / search_paths.rs
index 0cf04fe0a006a94623155305a0b6fd2efb5805bc..dfc27d3ae684d1370611c95d43d75de579724619 100644 (file)
@@ -36,13 +36,13 @@ pub fn new() -> SearchPaths {
 
     pub fn add_path(&mut self, path: &str) {
         let (kind, path) = if path.starts_with("native=") {
-            (PathKind::Native, path.slice_from("native=".len()))
+            (PathKind::Native, &path["native=".len()..])
         } else if path.starts_with("crate=") {
-            (PathKind::Crate, path.slice_from("crate=".len()))
+            (PathKind::Crate, &path["crate=".len()..])
         } else if path.starts_with("dependency=") {
-            (PathKind::Dependency, path.slice_from("dependency=".len()))
+            (PathKind::Dependency, &path["dependency=".len()..])
         } else if path.starts_with("all=") {
-            (PathKind::All, path.slice_from("all=".len()))
+            (PathKind::All, &path["all=".len()..])
         } else {
             (PathKind::All, path)
         };