blob: f145f9c3e529bc8fea88a1b3bbb355bcc3cd2292 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
use std::sync::Mutex;
struct Test {
comps: Mutex<String>,
}
fn main() {}
fn testing(test: Test) {
let _ = test.comps.inner.try_lock();
//~^ ERROR: field `inner` of struct `Mutex` is private
}
// https://github.com/rust-lang/rust/issues/54062
|