]> git.lizzy.rs Git - rust.git/blob - tests/debuginfo/msvc-scalarpair-params.rs
Rollup merge of #107780 - compiler-errors:instantiate-binder, r=lcnr
[rust.git] / tests / debuginfo / msvc-scalarpair-params.rs
1 // only-cdb
2 // compile-flags: -g
3
4 // cdb-command: g
5
6 // cdb-command: dx r1
7 // cdb-check:r1               : (0xa..0xc) [Type: core::ops::range::Range<u32>]
8 // cdb-command: dx r2
9 // cdb-check:r2               : (0x14..0x1e) [Type: core::ops::range::Range<u64>]
10
11 // cdb-command: g
12
13 // cdb-command: dx r1
14 // cdb-check:r1               : (0x9..0x64) [Type: core::ops::range::Range<u32>]
15 // cdb-command: dx r2
16 // cdb-check:r2               : (0xc..0x5a) [Type: core::ops::range::Range<u64>]
17
18 // cdb-command: g
19
20 // cdb-command: dx o1
21 // cdb-check:o1               : Some [Type: enum2$<core::option::Option<u32> >]
22 // cdb-check:    [+0x004] __0              : 0x4d2 [Type: [...]]
23 // cdb-command: dx o2
24 // cdb-check:o2               : Some [Type: enum2$<core::option::Option<u64> >]
25 // cdb-check:    [+0x008] __0              : 0x162e [Type: unsigned __int64]
26
27 // cdb-command: g
28
29 // cdb-command: dx t1
30 // cdb-check:t1               : (0xa, 0x14) [Type: tuple$<u32,u32>]
31 // cdb-check:    [0]              : 0xa [Type: unsigned int]
32 // cdb-check:    [1]              : 0x14 [Type: unsigned int]
33 // cdb-command: dx t2
34 // cdb-check:t2               : (0x1e, 0x28) [Type: tuple$<u64,u64>]
35 // cdb-check:    [0]              : 0x1e [Type: unsigned __int64]
36 // cdb-check:    [1]              : 0x28 [Type: unsigned __int64]
37
38 // cdb-command: g
39
40 // cdb-command: dx s
41 // cdb-check:s                : "this is a static str" [Type: ref$<str$>]
42 // cdb-check:    [len]            : 0x14 [Type: unsigned [...]]
43 // cdb-check:    [chars]
44
45 // cdb-command: g
46
47 // cdb-command: dx s
48 // cdb-check:s                : { len=0x5 } [Type: ref$<slice2$<u8> >]
49 // cdb-check:    [len]            : 0x5 [Type: unsigned [...]]
50 // cdb-check:    [0]              : 0x1 [Type: unsigned char]
51 // cdb-check:    [1]              : 0x2 [Type: unsigned char]
52 // cdb-check:    [2]              : 0x3 [Type: unsigned char]
53 // cdb-check:    [3]              : 0x4 [Type: unsigned char]
54 // cdb-check:    [4]              : 0x5 [Type: unsigned char]
55
56 use std::ops::Range;
57
58 fn range(r1: Range<u32>, r2: Range<u64>) {
59     zzz(); // #break
60 }
61
62 fn range_mut(mut r1: Range<u32>, mut r2: Range<u64>) {
63     if r1.start == 9 {
64         r1.end = 100;
65     }
66
67     if r2.start == 12 {
68         r2.end = 90;
69     }
70
71     zzz(); // #break
72 }
73
74 fn option(o1: Option<u32>, o2: Option<u64>) {
75     zzz(); // #break
76 }
77
78 fn tuple(t1: (u32, u32), t2: (u64, u64)) {
79     zzz(); // #break
80 }
81
82 fn str(s: &str) {
83     zzz(); // #break
84 }
85
86 fn slice(s: &[u8]) {
87     zzz(); // #break
88 }
89
90 fn zzz() {}
91
92 fn main() {
93     range(10..12, 20..30);
94     range_mut(9..20, 12..80);
95     option(Some(1234), Some(5678));
96     tuple((10, 20), (30, 40));
97     str("this is a static str");
98     slice(&[1, 2, 3, 4, 5]);
99 }