Skip to content

Commit

Permalink
Auto merge of #32112 - alexcrichton:fix-issues, r=aturon
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Mar 12, 2016
2 parents 8788ffc + b53764c commit a2c56de
Show file tree
Hide file tree
Showing 87 changed files with 476 additions and 2,477 deletions.
1 change: 0 additions & 1 deletion src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#![crate_type = "bin"]

#![feature(box_syntax)]
#![feature(dynamic_lib)]
#![feature(libc)]
#![feature(rustc_private)]
#![feature(str_char)]
Expand Down
18 changes: 12 additions & 6 deletions src/compiletest/procsrv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,31 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(deprecated)]

use std::dynamic_lib::DynamicLibrary;
use std::env;
use std::ffi::OsString;
use std::io::prelude::*;
use std::path::PathBuf;
use std::process::{ExitStatus, Command, Child, Output, Stdio};

fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
// Need to be sure to put both the lib_path and the aux path in the dylib
// search path for the child.
let mut path = DynamicLibrary::search_path();
let var = if cfg!(windows) {
"PATH"
} else if cfg!(target_os = "macos") {
"DYLD_LIBRARY_PATH"
} else {
"LD_LIBRARY_PATH"
};
let mut path = env::split_paths(&env::var_os(var).unwrap_or(OsString::new()))
.collect::<Vec<_>>();
if let Some(p) = aux_path {
path.insert(0, PathBuf::from(p))
}
path.insert(0, PathBuf::from(lib_path));

// Add the new dylib search path var
let var = DynamicLibrary::envvar();
let newpath = DynamicLibrary::create_path(&path);
let newpath = env::join_paths(&path).unwrap();
cmd.env(var, newpath);
}

Expand Down
8 changes: 4 additions & 4 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,14 +525,14 @@ impl<I: ExactSizeIterator + ?Sized> ExactSizeIterator for Box<I> {}
/// }
/// ```
#[rustc_paren_sugar]
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")]
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "28796")]
pub trait FnBox<A> {
type Output;

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

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

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

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

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

Expand Down
Loading

0 comments on commit a2c56de

Please sign in to comment.