diff --git a/crates/cargo-test-macro/src/lib.rs b/crates/cargo-test-macro/src/lib.rs index 937fbce6be50..105ec01356b2 100644 --- a/crates/cargo-test-macro/src/lib.rs +++ b/crates/cargo-test-macro/src/lib.rs @@ -187,7 +187,7 @@ fn to_token_stream(code: &str) -> TokenStream { static mut VERSION: (u32, bool) = (0, false); -fn version() -> &'static (u32, bool) { +fn version() -> (u32, bool) { static INIT: Once = Once::new(); INIT.call_once(|| { let output = Command::new("rustc") @@ -201,7 +201,7 @@ fn version() -> &'static (u32, bool) { let minor = vers.split('.').skip(1).next().unwrap().parse().unwrap(); unsafe { VERSION = (minor, is_nightly) } }); - unsafe { &VERSION } + unsafe { VERSION } } fn has_command(command: &str) -> bool { diff --git a/tests/build-std/main.rs b/tests/build-std/main.rs index 537ffc4bc5df..25721c6a243f 100644 --- a/tests/build-std/main.rs +++ b/tests/build-std/main.rs @@ -159,7 +159,7 @@ fn cross_custom() { r#" { "llvm-target": "x86_64-unknown-none-gnu", - "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", + "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "arch": "x86_64", "target-endian": "little", "target-pointer-width": "64", @@ -200,7 +200,7 @@ fn custom_test_framework() { r#" { "llvm-target": "x86_64-unknown-none-gnu", - "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", + "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "arch": "x86_64", "target-endian": "little", "target-pointer-width": "64",