rust/src/test/ui/issues/issue-54062.rs

14 lines
270 B
Rust
Raw Normal View History

2019-07-26 03:39:58 -05:00
use std::sync::Mutex;
struct Test {
comps: Mutex<String>,
}
fn main() {}
fn testing(test: Test) {
let _ = test.comps.inner.lock().unwrap();
//~^ ERROR: field `inner` of struct `std::sync::Mutex` is private
//~| ERROR: no method named `unwrap` found
}