I understand that the following code hangs because the Mutex doesn't get dropped between the arguments (I switched to a RwLock to duck the problem), but ... why not? I presume this is specified somewhere but I don't seem to be able to hunt it down from the Rust docs.
Thanks.
use std::sync::{RwLock, Mutex};
pub struct Generic {
ff: bool,
}
fn test_hang(ff0: bool, ff1: bool) {
println!("Test: {} {}", ff0, ff1);
}
fn main() {
let mm = Mutex::new(Generic {ff: true} );
test_hang(mm.lock().unwrap().ff, mm.lock().unwrap().ff);
}