1 // Testing the display of Mutex and MutexGuard in cdb.
4 // min-cdb-version: 10.0.21287.1005
6 // FIXME: Failed on update to 10.0.22000.1
9 // === CDB TESTS ==================================================================================
14 // cdb-check:m,d [Type: std::sync::mutex::Mutex<i32>]
15 // cdb-check: [...] inner [Type: std::sys_common::mutex::MovableMutex]
16 // cdb-check: [...] poison [Type: std::sync::poison::Flag]
17 // cdb-check: [...] data [Type: core::cell::UnsafeCell<i32>]
20 // cdb-command:dx m.data,d
21 // cdb-check:m.data,d [Type: core::cell::UnsafeCell<i32>]
22 // cdb-check: [...] value : 0 [Type: int]
25 // cdb-command:dx lock,d
26 // cdb-check:lock,d : Ok [Type: enum$<core::result::Result<std::sync::mutex::MutexGuard<i32>, enum$<std::sync::poison::TryLockError<std::sync::mutex::MutexGuard<i32> >, 0, 1, Poisoned> > >]
27 // cdb-check: [...] variant$ : Ok (0) [Type: core::result::Result]
28 // cdb-check: [...] __0 [Type: std::sync::mutex::MutexGuard<i32>]
32 #[allow(unused_variables)]
35 let m = Mutex::new(0);
36 let lock = m.try_lock();