about summary refs log tree commit diff
path: root/tests/ui/for-loop-while/for-loop-no-std.rs
blob: 8255d7b4200c0e422a8a789978f215a98d074a98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ run-pass
//@ ignore-emscripten no no_std executables
//@ ignore-wasm different `main` convention
#![allow(unused_imports)]
#![no_std]
#![no_main]

// Import global allocator and panic handler.
extern crate std as other;

#[macro_use] extern crate alloc;

use alloc::string::ToString;

#[no_mangle]
extern "C" fn main(_argc: core::ffi::c_int, _argv: *const *const u8) -> core::ffi::c_int {
    for _ in [1,2,3].iter() { }
    0
}