@@ -148,7 +148,7 @@ pub fn get_install_prefix_rpath(target_triple: &str) -> ~str {
148
148
let install_prefix = env ! ( "CFG_PREFIX" ) ;
149
149
150
150
let tlib = filesearch:: relative_target_lib_path ( target_triple) ;
151
- let mut path = Path :: new ( install_prefix) ;
151
+ let mut path = Path :: init ( install_prefix) ;
152
152
path. push ( & tlib) ;
153
153
let path = os:: make_absolute ( & path) ;
154
154
// FIXME (#9639): This needs to handle non-utf8 paths
@@ -183,7 +183,7 @@ mod test {
183
183
#[test]
184
184
fn test_prefix_rpath() {
185
185
let res = get_install_prefix_rpath(" triple");
186
- let mut d = Path::new (env!(" CFG_PREFIX "));
186
+ let mut d = Path::init (env!(" CFG_PREFIX "));
187
187
d.push(" lib/rustc/triple/lib");
188
188
debug!(" test_prefix_path: { } vs. { } ",
189
189
res,
@@ -194,7 +194,7 @@ mod test {
194
194
#[test]
195
195
fn test_prefix_rpath_abs() {
196
196
let res = get_install_prefix_rpath(" triple");
197
- assert!(Path::new (res).is_absolute());
197
+ assert!(Path::init (res).is_absolute());
198
198
}
199
199
200
200
#[test]
@@ -218,7 +218,7 @@ mod test {
218
218
fn test_rpath_relative() {
219
219
let o = abi::OsLinux;
220
220
let res = get_rpath_relative_to_output(o,
221
- &Path::new (" bin/rustc"), &Path::new (" lib/libstd. so"));
221
+ &Path::init (" bin/rustc"), &Path::init (" lib/libstd. so"));
222
222
assert_eq!(res.as_slice(), " $ORIGIN /../lib");
223
223
}
224
224
@@ -227,7 +227,7 @@ mod test {
227
227
fn test_rpath_relative() {
228
228
let o = abi::OsFreebsd;
229
229
let res = get_rpath_relative_to_output(o,
230
- &Path::new (" bin/rustc"), &Path::new (" lib/libstd. so"));
230
+ &Path::init (" bin/rustc"), &Path::init (" lib/libstd. so"));
231
231
assert_eq!(res.as_slice(), " $ORIGIN /../lib");
232
232
}
233
233
@@ -236,15 +236,15 @@ mod test {
236
236
fn test_rpath_relative() {
237
237
let o = abi::OsMacos;
238
238
let res = get_rpath_relative_to_output(o,
239
- &Path::new (" bin/rustc"),
240
- &Path::new (" lib/libstd. so"));
239
+ &Path::init (" bin/rustc"),
240
+ &Path::init (" lib/libstd. so"));
241
241
assert_eq!(res.as_slice(), " @loader_path/../lib");
242
242
}
243
243
244
244
#[test]
245
245
fn test_get_absolute_rpath() {
246
- let res = get_absolute_rpath(&Path::new (" lib/libstd. so"));
247
- let lib = os::make_absolute(&Path::new (" lib"));
246
+ let res = get_absolute_rpath(&Path::init (" lib/libstd. so"));
247
+ let lib = os::make_absolute(&Path::init (" lib"));
248
248
debug!(" test_get_absolute_rpath: { } vs. { } ",
249
249
res.to_str(), lib.display());
250
250
0 commit comments