@@ -32,7 +32,6 @@ fn std_lib() {
3232 simple_lib_std ( ) ;
3333 simple_bin_std ( ) ;
3434 lib_nostd ( ) ;
35- bin_nostd ( ) ;
3635 check_core ( ) ;
3736 cross_custom ( ) ;
3837 hashbrown ( ) ;
@@ -79,59 +78,6 @@ fn lib_nostd() {
7978 . run ( ) ;
8079}
8180
82- fn bin_nostd ( ) {
83- if cfg ! ( windows) {
84- // I think windows requires setting up mainCRTStartup,
85- // I'm not in the mood to figure it out.
86- return ;
87- }
88- let p = project ( )
89- . file ( "src/lib.rs" , "#![no_std] pub fn foo() {}" )
90- . file (
91- "src/main.rs" ,
92- r#"
93- #![no_std]
94- #![feature(lang_items, start, core_intrinsics)]
95-
96- use core::panic::PanicInfo;
97-
98- #[panic_handler]
99- fn panic(_info: &PanicInfo) -> ! {
100- unsafe { core::intrinsics::abort() }
101- }
102-
103- #[start]
104- fn start(_argc: isize, _argv: *const *const u8) -> isize {
105- foo::foo();
106- 123
107- }
108-
109- #[lang = "eh_personality"]
110- extern fn eh_personality() {}
111- "# ,
112- )
113- . file (
114- "build.rs" ,
115- r#"
116- fn main() {
117- let target = std::env::var("TARGET").expect("TARGET was not set");
118- if target.contains("apple-darwin") {
119- println!("cargo:rustc-link-lib=System");
120- } else if target.contains("linux") {
121- // TODO: why is this needed?
122- println!("cargo:rustc-link-lib=c");
123- }
124- }
125- "# ,
126- )
127- . build ( ) ;
128-
129- cargo_build_std ( & p, "run -v" , "core" )
130- . with_status ( 123 )
131- . with_stderr_contains ( "[RUNNING] [..]foo[EXE]`" )
132- . run ( ) ;
133- }
134-
13581fn check_core ( ) {
13682 let p = project ( )
13783 . file ( "src/lib.rs" , "#![no_std] fn unused_fn() {}" )
0 commit comments