]> git.lizzy.rs Git - rust.git/blob - tests/debuginfo/thread.rs
Rollup merge of #106707 - ehuss:remove-dupe-sha-1, r=Mark-Simulacrum
[rust.git] / tests / debuginfo / thread.rs
1 // Testing the the display of JoinHandle and Thread 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 join_handle,d
12 // cdb-check:join_handle,d    [Type: std::thread::JoinHandle<tuple$<> >]
13 // cdb-check:    [...] __0              [Type: std::thread::JoinInner<tuple$<> >]
14 //
15 // cdb-command:dx t,d
16 // cdb-check:t,d              : [...] [Type: std::thread::Thread *]
17 // cdb-check:[...] inner [...][Type: core::pin::Pin<alloc::sync::Arc<std::thread::Inner> >]
18
19 use std::thread;
20
21 #[allow(unused_variables)]
22 fn main()
23 {
24     let join_handle = thread::spawn(|| {
25         println!("Initialize a thread");
26     });
27     let t = join_handle.thread();
28     zzz(); // #break
29 }
30
31 fn zzz() {}