2018-08-30 12:18:55 +00:00
|
|
|
// run-pass
|
|
|
|
|
2017-10-18 01:45:42 +00:00
|
|
|
// ignore-emscripten no no_std executables
|
2017-06-19 19:40:51 +00:00
|
|
|
|
2019-04-03 17:50:28 +00:00
|
|
|
#![feature(lang_items, start, rustc_private)]
|
2014-09-16 02:29:47 +00:00
|
|
|
#![no_std]
|
|
|
|
|
2015-03-27 17:58:12 +00:00
|
|
|
extern crate std as other;
|
2015-01-06 03:13:38 +00:00
|
|
|
|
2014-09-16 02:29:47 +00:00
|
|
|
extern crate libc;
|
|
|
|
|
2015-01-01 04:43:46 +00:00
|
|
|
#[macro_use]
|
2017-06-13 22:52:59 +00:00
|
|
|
extern crate alloc;
|
2014-09-16 02:29:47 +00:00
|
|
|
|
2017-06-13 22:52:59 +00:00
|
|
|
use alloc::vec::Vec;
|
2014-09-16 02:29:47 +00:00
|
|
|
|
|
|
|
// Issue #16806
|
|
|
|
|
|
|
|
#[start]
|
2015-03-26 00:06:52 +00:00
|
|
|
fn start(_argc: isize, _argv: *const *const u8) -> isize {
|
2014-09-16 02:29:47 +00:00
|
|
|
let x: Vec<u8> = vec![0, 1, 2];
|
|
|
|
match x.last() {
|
|
|
|
Some(&2) => (),
|
|
|
|
_ => panic!(),
|
|
|
|
}
|
|
|
|
0
|
|
|
|
}
|