]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/pretty-std-collections-hash.rs
Rollup merge of #72369 - Lucretiel:socketaddr-parse, r=dtolnay
[rust.git] / src / test / debuginfo / pretty-std-collections-hash.rs
1 // cdb-only
2 // compile-flags:-g
3
4 // === CDB TESTS ==================================================================================
5
6 // cdb-command: g
7
8 // cdb-command: dx hash_set,d
9 // cdb-check:hash_set,d [...] : { size=15 } [Type: [...]::HashSet<u64, [...]>]
10 // cdb-check:    [size]           : 15 [Type: [...]]
11 // cdb-check:    [capacity]       : [...]
12 // cdb-check:    [[...]] [...]    : 0 [Type: unsigned __int64]
13 // cdb-command: dx hash_set,d
14 // cdb-check:    [[...]] [...]    : 1 [Type: unsigned __int64]
15 // cdb-command: dx hash_set,d
16 // cdb-check:    [[...]] [...]    : 2 [Type: unsigned __int64]
17 // cdb-command: dx hash_set,d
18 // cdb-check:    [[...]] [...]    : 3 [Type: unsigned __int64]
19 // cdb-command: dx hash_set,d
20 // cdb-check:    [[...]] [...]    : 4 [Type: unsigned __int64]
21 // cdb-command: dx hash_set,d
22 // cdb-check:    [[...]] [...]    : 5 [Type: unsigned __int64]
23 // cdb-command: dx hash_set,d
24 // cdb-check:    [[...]] [...]    : 6 [Type: unsigned __int64]
25 // cdb-command: dx hash_set,d
26 // cdb-check:    [[...]] [...]    : 7 [Type: unsigned __int64]
27 // cdb-command: dx hash_set,d
28 // cdb-check:    [[...]] [...]    : 8 [Type: unsigned __int64]
29 // cdb-command: dx hash_set,d
30 // cdb-check:    [[...]] [...]    : 9 [Type: unsigned __int64]
31 // cdb-command: dx hash_set,d
32 // cdb-check:    [[...]] [...]    : 10 [Type: unsigned __int64]
33 // cdb-command: dx hash_set,d
34 // cdb-check:    [[...]] [...]    : 11 [Type: unsigned __int64]
35 // cdb-command: dx hash_set,d
36 // cdb-check:    [[...]] [...]    : 12 [Type: unsigned __int64]
37 // cdb-command: dx hash_set,d
38 // cdb-check:    [[...]] [...]    : 13 [Type: unsigned __int64]
39 // cdb-command: dx hash_set,d
40 // cdb-check:    [[...]] [...]    : 14 [Type: unsigned __int64]
41
42 // cdb-command: dx hash_map,d
43 // cdb-check:hash_map,d [...] : { size=15 } [Type: [...]::HashMap<u64, u64, [...]>]
44 // cdb-check:    [size]           : 15 [Type: [...]]
45 // cdb-check:    [capacity]       : [...]
46 // cdb-check:    ["0x0"]          : 0 [Type: unsigned __int64]
47 // cdb-command: dx hash_map,d
48 // cdb-check:    ["0x1"]          : 1 [Type: unsigned __int64]
49 // cdb-command: dx hash_map,d
50 // cdb-check:    ["0x2"]          : 2 [Type: unsigned __int64]
51 // cdb-command: dx hash_map,d
52 // cdb-check:    ["0x3"]          : 3 [Type: unsigned __int64]
53 // cdb-command: dx hash_map,d
54 // cdb-check:    ["0x4"]          : 4 [Type: unsigned __int64]
55 // cdb-command: dx hash_map,d
56 // cdb-check:    ["0x5"]          : 5 [Type: unsigned __int64]
57 // cdb-command: dx hash_map,d
58 // cdb-check:    ["0x6"]          : 6 [Type: unsigned __int64]
59 // cdb-command: dx hash_map,d
60 // cdb-check:    ["0x7"]          : 7 [Type: unsigned __int64]
61 // cdb-command: dx hash_map,d
62 // cdb-check:    ["0x8"]          : 8 [Type: unsigned __int64]
63 // cdb-command: dx hash_map,d
64 // cdb-check:    ["0x9"]          : 9 [Type: unsigned __int64]
65 // cdb-command: dx hash_map,d
66 // cdb-check:    ["0xa"]          : 10 [Type: unsigned __int64]
67 // cdb-command: dx hash_map,d
68 // cdb-check:    ["0xb"]          : 11 [Type: unsigned __int64]
69 // cdb-command: dx hash_map,d
70 // cdb-check:    ["0xc"]          : 12 [Type: unsigned __int64]
71 // cdb-command: dx hash_map,d
72 // cdb-check:    ["0xd"]          : 13 [Type: unsigned __int64]
73 // cdb-command: dx hash_map,d
74 // cdb-check:    ["0xe"]          : 14 [Type: unsigned __int64]
75
76 #![allow(unused_variables)]
77 use std::collections::HashSet;
78 use std::collections::HashMap;
79
80
81 fn main() {
82     // HashSet
83     let mut hash_set = HashSet::new();
84     for i in 0..15 {
85         hash_set.insert(i as u64);
86     }
87
88     // HashMap
89     let mut hash_map = HashMap::new();
90     for i in 0..15 {
91         hash_map.insert(i as u64, i as u64);
92     }
93
94     zzz(); // #break
95 }
96
97 fn zzz() { () }