Skip to content

Commit a2c56de

Browse files
committed
Auto merge of #32112 - alexcrichton:fix-issues, r=aturon
std: Fix tracking issues and clean deprecated APIs This PR fixes up a number of discrepancies found with tracking issues (some closed, some needed new ones, etc), and also cleans out all pre-1.8 deprecated APIs. The big beast here was dealing with `std::dynamic_lib`, and via many applications of a large hammer it's now out of the standard library.
2 parents 8788ffc + b53764c commit a2c56de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+476
-2477
lines changed

src/compiletest/compiletest.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#![crate_type = "bin"]
1212

1313
#![feature(box_syntax)]
14-
#![feature(dynamic_lib)]
1514
#![feature(libc)]
1615
#![feature(rustc_private)]
1716
#![feature(str_char)]

src/compiletest/procsrv.rs

+12-6
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,31 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(deprecated)]
12-
13-
use std::dynamic_lib::DynamicLibrary;
11+
use std::env;
12+
use std::ffi::OsString;
1413
use std::io::prelude::*;
1514
use std::path::PathBuf;
1615
use std::process::{ExitStatus, Command, Child, Output, Stdio};
1716

1817
fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
1918
// Need to be sure to put both the lib_path and the aux path in the dylib
2019
// search path for the child.
21-
let mut path = DynamicLibrary::search_path();
20+
let var = if cfg!(windows) {
21+
"PATH"
22+
} else if cfg!(target_os = "macos") {
23+
"DYLD_LIBRARY_PATH"
24+
} else {
25+
"LD_LIBRARY_PATH"
26+
};
27+
let mut path = env::split_paths(&env::var_os(var).unwrap_or(OsString::new()))
28+
.collect::<Vec<_>>();
2229
if let Some(p) = aux_path {
2330
path.insert(0, PathBuf::from(p))
2431
}
2532
path.insert(0, PathBuf::from(lib_path));
2633

2734
// Add the new dylib search path var
28-
let var = DynamicLibrary::envvar();
29-
let newpath = DynamicLibrary::create_path(&path);
35+
let newpath = env::join_paths(&path).unwrap();
3036
cmd.env(var, newpath);
3137
}
3238

src/liballoc/boxed.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -525,14 +525,14 @@ impl<I: ExactSizeIterator + ?Sized> ExactSizeIterator for Box<I> {}
525525
/// }
526526
/// ```
527527
#[rustc_paren_sugar]
528-
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")]
528+
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "28796")]
529529
pub trait FnBox<A> {
530530
type Output;
531531

532532
fn call_box(self: Box<Self>, args: A) -> Self::Output;
533533
}
534534

535-
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")]
535+
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "28796")]
536536
impl<A, F> FnBox<A> for F where F: FnOnce<A>
537537
{
538538
type Output = F::Output;
@@ -542,7 +542,7 @@ impl<A, F> FnBox<A> for F where F: FnOnce<A>
542542
}
543543
}
544544

545-
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")]
545+
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "28796")]
546546
impl<'a, A, R> FnOnce<A> for Box<FnBox<A, Output = R> + 'a> {
547547
type Output = R;
548548

@@ -551,7 +551,7 @@ impl<'a, A, R> FnOnce<A> for Box<FnBox<A, Output = R> + 'a> {
551551
}
552552
}
553553

554-
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")]
554+
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "28796")]
555555
impl<'a, A, R> FnOnce<A> for Box<FnBox<A, Output = R> + Send + 'a> {
556556
type Output = R;
557557

0 commit comments

Comments
 (0)