]> git.lizzy.rs Git - rust.git/blob - tests/ui/array-slice-vec/vec-macro-no-std.rs
Rollup merge of #106715 - BoxyUwU:new_solver_triagebot, r=lcnr
[rust.git] / tests / ui / array-slice-vec / vec-macro-no-std.rs
1 // run-pass
2
3 // ignore-emscripten no no_std executables
4
5 #![feature(lang_items, start, rustc_private)]
6 #![no_std]
7
8 extern crate std as other;
9
10 extern crate libc;
11
12 #[macro_use]
13 extern crate alloc;
14
15 use alloc::vec::Vec;
16
17 // Issue #16806
18
19 #[start]
20 fn start(_argc: isize, _argv: *const *const u8) -> isize {
21     let x: Vec<u8> = vec![0, 1, 2];
22     match x.last() {
23         Some(&2) => (),
24         _ => panic!(),
25     }
26     0
27 }