]> git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/pretty-huge-vec.rs
New upstream version 1.46.0~beta.2+dfsg1
[rustc.git] / src / test / debuginfo / pretty-huge-vec.rs
1 // ignore-windows failing on win32 bot
2 // ignore-freebsd: gdb package too new
3 // ignore-android: FIXME(#10381)
4 // compile-flags:-g
5 // min-gdb-version 8.1
6 // min-lldb-version: 310
7
8 // === GDB TESTS ===================================================================================
9
10 // gdb-command: run
11
12 // gdb-command: print vec
13 // gdb-check:$1 = Vec(size=1000000000) = {[...]...}
14
15 // gdb-command: print slice
16 // gdb-check:$2 = &[u8] {data_ptr: [...]"\000", length: 1000000000}
17
18 #![allow(unused_variables)]
19
20 fn main() {
21
22 // Vec
23 let mut vec: Vec<u8> = Vec::with_capacity(1_000_000_000);
24 unsafe{ vec.set_len(1_000_000_000) }
25 let slice = &vec[..];
26
27 zzz(); // #break
28 }
29
30 fn zzz() { () }