about summary refs log tree commit diff
path: root/src/comp/back
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2012-02-23 16:59:30 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2012-02-23 17:00:19 +0100
commit780f8277f44bb2eddaf6c516d60b0a6b9b557a5b (patch)
treef8b30650ab8b26c27f384e422bcff3cd8cbcab79 /src/comp/back
parent1d2b4b97edd7c4038f96c81d8945e294442092a2 (diff)
downloadrust-780f8277f44bb2eddaf6c516d60b0a6b9b557a5b.tar.gz
rust-780f8277f44bb2eddaf6c516d60b0a6b9b557a5b.zip
Finish cleanup of core::str
Closes #1849
Diffstat (limited to 'src/comp/back')
-rw-r--r--src/comp/back/link.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/comp/back/link.rs b/src/comp/back/link.rs
index fd966b40884..c2cc106b3e2 100644
--- a/src/comp/back/link.rs
+++ b/src/comp/back/link.rs
@@ -109,13 +109,10 @@ mod write {
     // Decides what to call an intermediate file, given the name of the output
     // and the extension to use.
     fn mk_intermediate_name(output_path: str, extension: str) -> str unsafe {
-        let stem = alt str::index(output_path, '.') {
-                       option::some(dot_pos) {
-                           str::slice(output_path, 0u, dot_pos)
-                       }
-                       option::none { output_path }
-                   };
-
+        let stem = alt str::find_char(output_path, '.') {
+          some(dot_pos) { str::slice(output_path, 0u, dot_pos) }
+          none { output_path }
+        };
         ret stem + "." + extension;
     }
 
@@ -566,7 +563,7 @@ fn link_binary(sess: session,
     // Converts a library file name into a cc -l argument
     fn unlib(config: @session::config, filename: str) -> str unsafe {
         let rmlib = fn@(filename: str) -> str {
-            let found = str::find(filename, "lib");
+            let found = str::find_str(filename, "lib");
             if config.os == session::os_macos ||
                 (config.os == session::os_linux ||
                  config.os == session::os_freebsd) &&