rust/tests/debuginfo/rwlock-write.rs
Martin Nordholts 5b57d02e9f compiletest: Use //@ prefixes also for debuginfo test directives
So that when we later add support for revisions we can use the same
syntax for revisions as elsewhere.

This also prevents people from making typos for commands since
`src/tools/compiletest/src/directives/directive_names.rs` will catch such
typos now.

Note that we one FIXME for a non-trivial change for later:
```
// FIXME(148097): Change `// cdb-checksimple_closure` to `//@ cdb-check:simple_closure`
```
2025-11-25 06:13:45 +01:00

27 lines
682 B
Rust

// Testing the display of RwLockWriteGuard.
// cdb-only
//@ min-cdb-version: 10.0.18317.1001
//@ compile-flags:-g
// === CDB TESTS ==================================================================================
//
//@ cdb-command:g
//
//@ cdb-command:dx w
//@ cdb-check:w [Type: std::sync::poison::rwlock::RwLockWriteGuard<i32>]
//@ cdb-check: [...] lock : [...] [Type: std::sync::poison::rwlock::RwLock<i32> *]
//@ cdb-check: [...] poison [Type: std::sync::poison::Guard]
#[allow(unused_variables)]
use std::sync::RwLock;
fn main()
{
let l = RwLock::new(0);
let w = l.write().unwrap();
zzz(); // #break
}
fn zzz() {}