rust/tests/ui/issues/issue-54062.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
207 B
Rust
Raw Normal View History

2019-07-26 08:39:58 +00:00
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
2019-07-26 08:39:58 +00:00
}