diff --git a/src/rustversion.txt b/src/rustversion.txt index 8918bbc071a..891320872cb 100644 --- a/src/rustversion.txt +++ b/src/rustversion.txt @@ -1 +1 @@ -2016-11-03 +2016-11-16 diff --git a/tests/cargotest/support/mod.rs b/tests/cargotest/support/mod.rs index 18f11244b06..429a0e65da3 100644 --- a/tests/cargotest/support/mod.rs +++ b/tests/cargotest/support/mod.rs @@ -235,8 +235,13 @@ impl ErrMsg for Result { // Path to cargo executables pub fn cargo_dir() -> PathBuf { env::var_os("CARGO_BIN_PATH").map(PathBuf::from).or_else(|| { - env::current_exe().ok().as_ref().and_then(|s| s.parent()) - .map(|s| s.to_path_buf()) + env::current_exe().ok().map(|mut path| { + path.pop(); + if path.ends_with("deps") { + path.pop(); + } + path + }) }).unwrap_or_else(|| { panic!("CARGO_BIN_PATH wasn't set. Cannot continue running test") }) diff --git a/tests/proc-macro.rs b/tests/proc-macro.rs index c1a2306e6aa..59dc96e21c7 100644 --- a/tests/proc-macro.rs +++ b/tests/proc-macro.rs @@ -49,8 +49,8 @@ fn noop() { use proc_macro::TokenStream; #[proc_macro_derive(Noop)] - pub fn noop(input: TokenStream) -> TokenStream { - input + pub fn noop(_input: TokenStream) -> TokenStream { + "".parse().unwrap() } "#); noop.build(); @@ -87,8 +87,8 @@ fn impl_and_derive() { fn impl_by_transmogrify(&self) -> bool; } - #[derive(Transmogrify)] - struct X; + #[derive(Transmogrify, Debug)] + struct X { success: bool } fn main() { let x = X::new(); @@ -115,8 +115,6 @@ fn impl_and_derive() { #[proc_macro_derive(Transmogrify)] #[doc(hidden)] pub fn transmogrify(input: TokenStream) -> TokenStream { - assert_eq!(input.to_string(), "struct X;\n"); - " impl X { fn new() -> Self { @@ -129,11 +127,6 @@ fn impl_and_derive() { true } } - - #[derive(Debug)] - struct X { - success: bool, - } ".parse().unwrap() } "#);