]> git.lizzy.rs Git - rust.git/blob - tests/debuginfo/range-types.rs
Rollup merge of #107819 - clubby789:x-py-root, r=jyn514
[rust.git] / tests / debuginfo / range-types.rs
1 // Testing the display of range types in cdb.
2
3 // cdb-only
4 // min-cdb-version: 10.0.18317.1001
5 // compile-flags:-g
6
7 // === CDB TESTS ==================================================================================
8
9 // cdb-command: g
10
11 // cdb-command: dx r1,d
12 // cdb-check:r1,d             : (3..5) [Type: core::ops::range::Range<i32>]
13 // cdb-check:    [<Raw View>]     [Type: core::ops::range::Range<i32>]
14
15 // cdb-command: dx r2,d
16 // cdb-check:r2,d             : (2..) [Type: core::ops::range::RangeFrom<i32>]
17 // cdb-check:    [<Raw View>]     [Type: core::ops::range::RangeFrom<i32>]
18
19 // cdb-command: dx r3,d
20 // cdb-check:r3,d             : (1..=4) [Type: core::ops::range::RangeInclusive<i32>]
21 // cdb-check:    [<Raw View>]     [Type: core::ops::range::RangeInclusive<i32>]
22
23 // cdb-command: dx r4,d
24 // cdb-check:r4,d             : (..10) [Type: core::ops::range::RangeTo<i32>]
25 // cdb-check:    [<Raw View>]     [Type: core::ops::range::RangeTo<i32>]
26
27 // cdb-command: dx r5,d
28 // cdb-check:r5,d             : (..=3) [Type: core::ops::range::RangeToInclusive<i32>]
29 // cdb-check:    [<Raw View>]     [Type: core::ops::range::RangeToInclusive<i32>]
30
31 // cdb-command: dx r6,d
32 // cdb-check:r6,d             [Type: core::ops::range::RangeFull]
33
34 #[allow(unused_variables)]
35
36 use std::ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeToInclusive};
37
38 fn main()
39 {
40     let r1 = (3..5);
41     let r2 = (2..);
42     let r3 = (1..=4);
43     let r4 = (..10);
44     let r5 = (..=3);
45     let r6 = (..);
46     zzz(); // #break
47 }
48
49 fn zzz() { () }