rust/src/test/ui/issues/issue-54062.rs
2019-07-26 17:39:58 +09:00

14 lines
270 B
Rust

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
}