1 // Testing the display of Mutex and MutexGuard in cdb.
4 // min-cdb-version: 10.0.21287.1005
7 // === CDB TESTS ==================================================================================
12 // cdb-check:m,d [Type: std::sync::mutex::Mutex<i32>]
13 // cdb-check: [...] inner [Type: std::sys_common::mutex::MovableMutex]
14 // cdb-check: [...] poison [Type: std::sync::poison::Flag]
15 // cdb-check: [...] data [Type: core::cell::UnsafeCell<i32>]
18 // cdb-command:dx m.data,d
19 // cdb-check:m.data,d [Type: core::cell::UnsafeCell<i32>]
20 // cdb-check: [...] value : 0 [Type: int]
23 // cdb-command:dx lock,d
24 // 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> > >]
25 // cdb-check: [...] variant$ : Ok (0) [Type: core::result::Result]
26 // cdb-check: [...] __0 [Type: std::sync::mutex::MutexGuard<i32>]
30 #[allow(unused_variables)]
33 let m = Mutex::new(0);
34 let lock = m.try_lock();