Test fixes and rebase conflicts, round 2

This commit is contained in:
Alex Crichton 2015-03-27 13:22:26 -07:00
parent 1c78478c12
commit d65fee28d3
6 changed files with 8 additions and 17 deletions

View File

@ -13,7 +13,6 @@
#![feature(box_syntax)] #![feature(box_syntax)]
#![feature(collections)] #![feature(collections)]
#![feature(old_io)] #![feature(old_io)]
#![feature(old_path)]
#![feature(rustc_private)] #![feature(rustc_private)]
#![feature(unboxed_closures)] #![feature(unboxed_closures)]
#![feature(std_misc)] #![feature(std_misc)]

View File

@ -8,11 +8,9 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![allow(deprecated)] // for old path, for dynamic_lib
use std::dynamic_lib::DynamicLibrary; use std::dynamic_lib::DynamicLibrary;
use std::io::prelude::*; use std::io::prelude::*;
use std::old_path::Path; use std::path::PathBuf;
use std::process::{ExitStatus, Command, Child, Output, Stdio}; use std::process::{ExitStatus, Command, Child, Output, Stdio};
fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) { fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
@ -20,15 +18,15 @@ fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
// search path for the child. // search path for the child.
let mut path = DynamicLibrary::search_path(); let mut path = DynamicLibrary::search_path();
match aux_path { match aux_path {
Some(p) => path.insert(0, Path::new(p)), Some(p) => path.insert(0, PathBuf::from(p)),
None => {} None => {}
} }
path.insert(0, Path::new(lib_path)); path.insert(0, PathBuf::from(lib_path));
// Add the new dylib search path var // Add the new dylib search path var
let var = DynamicLibrary::envvar(); let var = DynamicLibrary::envvar();
let newpath = DynamicLibrary::create_path(&path); let newpath = DynamicLibrary::create_path(&path);
let newpath = String::from_utf8(newpath).unwrap(); let newpath = newpath.to_str().unwrap().to_string();
cmd.env(var, &newpath); cmd.env(var, &newpath);
} }

View File

@ -31,7 +31,6 @@
#![feature(core)] #![feature(core)]
#![feature(hash)] #![feature(hash)]
#![feature(libc)] #![feature(libc)]
#![feature(old_path)]
#![feature(quote)] #![feature(quote)]
#![feature(rustc_diagnostic_macros)] #![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)] #![feature(rustc_private)]

View File

@ -27,7 +27,6 @@
#![feature(exit_status)] #![feature(exit_status)]
#![feature(set_stdio)] #![feature(set_stdio)]
#![feature(libc)] #![feature(libc)]
#![feature(old_path)]
#![feature(rustc_private)] #![feature(rustc_private)]
#![feature(staged_api)] #![feature(staged_api)]
#![feature(std_misc)] #![feature(std_misc)]
@ -65,8 +64,6 @@ use std::path::PathBuf;
use std::rc::Rc; use std::rc::Rc;
use std::sync::mpsc::channel; use std::sync::mpsc::channel;
#[allow(deprecated)] use std::old_path::Path;
use externalfiles::ExternalHtml; use externalfiles::ExternalHtml;
use serialize::Decodable; use serialize::Decodable;
use serialize::json::{self, Json}; use serialize::json::{self, Json};
@ -434,7 +431,7 @@ fn rust_input(cratefile: &str, externs: core::Externs, matches: &getopts::Matche
// Load all plugins/passes into a PluginManager // Load all plugins/passes into a PluginManager
let path = matches.opt_str("plugin-path") let path = matches.opt_str("plugin-path")
.unwrap_or("/tmp/rustdoc/plugins".to_string()); .unwrap_or("/tmp/rustdoc/plugins".to_string());
let mut pm = plugins::PluginManager::new(Path::new(path)); let mut pm = plugins::PluginManager::new(PathBuf::from(path));
for pass in &passes { for pass in &passes {
let plugin = match PASSES.iter() let plugin = match PASSES.iter()
.position(|&(p, _, _)| { .position(|&(p, _, _)| {

View File

@ -16,7 +16,7 @@ use std::dynamic_lib as dl;
use serialize::json; use serialize::json;
use std::mem; use std::mem;
use std::string::String; use std::string::String;
use std::old_path::{Path, GenericPath}; use std::path::PathBuf;
pub type PluginJson = Option<(String, json::Json)>; pub type PluginJson = Option<(String, json::Json)>;
pub type PluginResult = (clean::Crate, PluginJson); pub type PluginResult = (clean::Crate, PluginJson);
@ -27,12 +27,12 @@ pub struct PluginManager {
dylibs: Vec<dl::DynamicLibrary> , dylibs: Vec<dl::DynamicLibrary> ,
callbacks: Vec<PluginCallback> , callbacks: Vec<PluginCallback> ,
/// The directory plugins will be loaded from /// The directory plugins will be loaded from
pub prefix: Path, pub prefix: PathBuf,
} }
impl PluginManager { impl PluginManager {
/// Create a new plugin manager /// Create a new plugin manager
pub fn new(prefix: Path) -> PluginManager { pub fn new(prefix: PathBuf) -> PluginManager {
PluginManager { PluginManager {
dylibs: Vec::new(), dylibs: Vec::new(),
callbacks: Vec::new(), callbacks: Vec::new(),

View File

@ -21,8 +21,6 @@ use env;
use ffi::{AsOsStr, CString, OsString}; use ffi::{AsOsStr, CString, OsString};
use mem; use mem;
use path::{Path, PathBuf}; use path::{Path, PathBuf};
#[cfg(not(target_os = "android"))] use os;
#[cfg(not(target_os = "android"))] use str;
pub struct DynamicLibrary { pub struct DynamicLibrary {
handle: *mut u8 handle: *mut u8