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