From dbb909136e610b9753dcd9ffcfb8f6a3f6510060 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 20 Dec 2024 04:20:26 -0800 Subject: [PATCH] Replace #[start] with extern fn main --- test_suite/no_std/src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test_suite/no_std/src/main.rs b/test_suite/no_std/src/main.rs index f8ef34b44..e53389229 100644 --- a/test_suite/no_std/src/main.rs +++ b/test_suite/no_std/src/main.rs @@ -1,9 +1,12 @@ #![allow(internal_features)] -#![feature(lang_items, start)] +#![feature(lang_items)] #![no_std] +#![no_main] -#[start] -fn start(_argc: isize, _argv: *const *const u8) -> isize { +use core::ffi::c_int; + +#[no_mangle] +extern "C" fn main(_argc: c_int, _argv: *const *const u8) -> c_int { 0 }