1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#[macro_use]
extern crate lazy_static;
use std::sync::Mutex;

lazy_static! {
    static ref M : Mutex<()> = Mutex::new(());
}

fn main(){
    let _l = M.lock().expect("locked");
    println!("hello");
}