1 // basic tests to see that certain "obvious" errors are caught by
2 // these types no longer requiring `'static` (RFC 458)
6 use std::sync::{Mutex, RwLock, mpsc};
13 //~^^ ERROR `x` does not live long enough
15 let _dangling = *lock.lock().unwrap();
23 //~^^ ERROR `x` does not live long enough
24 let _dangling = *lock.read().unwrap();
30 let (tx, rx) = mpsc::channel();
34 //~^^^ ERROR `x` does not live long enough
36 let _dangling = rx.recv();