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