2013-11-07 17:36:17 -08:00
|
|
|
// Issue #8380
|
|
|
|
|
|
|
|
|
2014-08-04 15:42:36 -07:00
|
|
|
use std::sync::atomic::*;
|
2013-11-07 17:36:17 -08:00
|
|
|
use std::ptr;
|
|
|
|
|
|
|
|
fn main() {
|
2015-05-27 11:18:36 +03:00
|
|
|
let x = AtomicBool::new(false);
|
2019-05-05 12:02:32 +01:00
|
|
|
let x = *&x; //~ ERROR: cannot move out of a shared reference
|
2015-05-27 11:18:36 +03:00
|
|
|
let x = AtomicIsize::new(0);
|
2019-05-05 12:02:32 +01:00
|
|
|
let x = *&x; //~ ERROR: cannot move out of a shared reference
|
2015-05-27 11:18:36 +03:00
|
|
|
let x = AtomicUsize::new(0);
|
2019-05-05 12:02:32 +01:00
|
|
|
let x = *&x; //~ ERROR: cannot move out of a shared reference
|
2015-01-08 22:02:42 +11:00
|
|
|
let x: AtomicPtr<usize> = AtomicPtr::new(ptr::null_mut());
|
2019-05-05 12:02:32 +01:00
|
|
|
let x = *&x; //~ ERROR: cannot move out of a shared reference
|
2013-11-07 17:36:17 -08:00
|
|
|
}
|