From f1f136bb661725dbf283280a793410b7abe2ad73 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Mon, 9 Jan 2023 17:27:28 -0500 Subject: [PATCH] Fix tests --- tests/lang_tests_common.rs | 1 - tests/run/int.rs | 16 +++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/tests/lang_tests_common.rs b/tests/lang_tests_common.rs index 8e378177e245..53d3266776d0 100644 --- a/tests/lang_tests_common.rs +++ b/tests/lang_tests_common.rs @@ -46,7 +46,6 @@ pub fn main_inner(profile: Profile) { &format!("-Zcodegen-backend={}/target/debug/librustc_codegen_gcc.so", current_dir), "--sysroot", &format!("{}/build_sysroot/sysroot/", current_dir), "-Zno-parallel-llvm", - "-C", "panic=abort", "-C", "link-arg=-lc", "-o", exe.to_str().expect("to_str"), path.to_str().expect("to_str"), diff --git a/tests/run/int.rs b/tests/run/int.rs index 2b90e4ae8d82..5693b6a215a6 100644 --- a/tests/run/int.rs +++ b/tests/run/int.rs @@ -3,22 +3,14 @@ // Run-time: // status: 0 -#![feature(bench_black_box, const_black_box, core_intrinsics, start)] - -#![no_std] - -#[panic_handler] -fn panic_handler(_: &core::panic::PanicInfo) -> ! { - core::intrinsics::abort(); -} +#![feature(bench_black_box, const_black_box)] /* * Code */ -#[start] -fn main(_argc: isize, _argv: *const *const u8) -> isize { - use core::hint::black_box; +fn main() { + use std::hint::black_box; macro_rules! check { ($ty:ty, $expr:expr) => { @@ -335,6 +327,4 @@ fn main(_argc: isize, _argv: *const *const u8) -> isize { const VAL5: T = 73236519889708027473620326106273939584_i128; check_ops128!(); } - - 0 }