]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/rwlock-read.rs
feat(rustdoc): open sidebar menu when links inside it are focused
[rust.git] / src / test / debuginfo / rwlock-read.rs
1 // Testing the display of RwLock and RwLockReadGuard 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 l
12 // cdb-check:l                [Type: std::sync::rwlock::RwLock<i32>]
13 // cdb-check:    [...] poison           [Type: std::sync::poison::Flag]
14 // cdb-check:    [...] data             [Type: core::cell::UnsafeCell<i32>]
15 //
16 // cdb-command:dx r
17 // cdb-check:r                [Type: std::sync::rwlock::RwLockReadGuard<i32>]
18 // cdb-check:    [...] lock             : [...] [Type: std::sync::rwlock::RwLock<i32> *]
19 //
20 // cdb-command:dx r.lock->data,d
21 // cdb-check:r.lock->data,d   [Type: core::cell::UnsafeCell<i32>]
22 // cdb-check:    [...] value            : 0 [Type: int]
23
24 #[allow(unused_variables)]
25
26 use std::sync::RwLock;
27
28 fn main()
29 {
30     let l = RwLock::new(0);
31     let r = l.read().unwrap();
32     zzz(); // #break
33 }
34
35 fn zzz() {}