From b1dafe49afafd4650c4071cf64deaea113072eff Mon Sep 17 00:00:00 2001 From: Michael Sullivan Date: Sat, 14 Jul 2012 10:27:09 -0700 Subject: [PATCH] Get rid of more deprecated strs on non 64-bit linux platforms. --- src/libcore/os.rs | 2 +- src/rustc/back/rpath.rs | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/libcore/os.rs b/src/libcore/os.rs index 923278292478..91f08ef5dd2a 100644 --- a/src/libcore/os.rs +++ b/src/libcore/os.rs @@ -554,7 +554,7 @@ fn list_dir(p: path) -> ~[~str] { fn star(p: ~str) -> ~str { p } #[cfg(windows)] - fn star(p: str) -> ~str { + fn star(p: ~str) -> ~str { let pl = str::len(p); if pl == 0u || (p[pl - 1u] as char != path::consts::path_sep || p[pl - 1u] as char != path::consts::alt_path_sep) { diff --git a/src/rustc/back/rpath.rs b/src/rustc/back/rpath.rs index 2e16d92cec80..7062d6e997e1 100644 --- a/src/rustc/back/rpath.rs +++ b/src/rustc/back/rpath.rs @@ -314,32 +314,32 @@ mod test { #[test] #[cfg(target_os = "linux")] fn test_rpath_relative() { - let o = session::os_linux; - check not_win32(o); - let res = get_rpath_relative_to_output(o, + let o = session::os_linux; + check not_win32(o); + let res = get_rpath_relative_to_output(o, ~"/usr", ~"bin/rustc", ~"lib/libstd.so"); - assert res == ~"$ORIGIN/../lib"; + assert res == ~"$ORIGIN/../lib"; } #[test] #[cfg(target_os = "freebsd")] fn test_rpath_relative() { - let o = session::os_freebsd; - check not_win32(o); - let res = get_rpath_relative_to_output(o, - "/usr", "bin/rustc", "lib/libstd.so"); - assert res == "$ORIGIN/../lib"; + let o = session::os_freebsd; + check not_win32(o); + let res = get_rpath_relative_to_output(o, + ~"/usr", ~"bin/rustc", ~"lib/libstd.so"); + assert res == ~"$ORIGIN/../lib"; } #[test] #[cfg(target_os = "macos")] fn test_rpath_relative() { - // this is why refinements would be nice - let o = session::os_macos; - check not_win32(o); - let res = get_rpath_relative_to_output(o, "/usr", "bin/rustc", - "lib/libstd.so"); - assert res == "@executable_path/../lib"; + // this is why refinements would be nice + let o = session::os_macos; + check not_win32(o); + let res = get_rpath_relative_to_output(o, ~"/usr", ~"bin/rustc", + ~"lib/libstd.so"); + assert res == ~"@executable_path/../lib"; } #[test]