2013-09-02 08:33:17 -05:00
|
|
|
// issue 7327
|
|
|
|
|
2014-06-07 13:13:26 -05:00
|
|
|
use std::sync::Arc;
|
2013-09-02 08:33:17 -05:00
|
|
|
|
2015-01-08 04:54:35 -06:00
|
|
|
struct A { y: Arc<isize>, x: Arc<isize> }
|
2013-09-02 08:33:17 -05:00
|
|
|
|
|
|
|
impl Drop for A {
|
2014-03-22 02:55:50 -05:00
|
|
|
fn drop(&mut self) { println!("x={}", *self.x); }
|
2013-09-02 08:33:17 -05:00
|
|
|
}
|
|
|
|
fn main() {
|
|
|
|
let a = A { y: Arc::new(1), x: Arc::new(2) };
|
2013-09-19 20:15:21 -05:00
|
|
|
let _b = A { y: Arc::new(3), ..a }; //~ ERROR cannot move out of type `A`
|
|
|
|
let _c = a;
|
2013-09-02 08:33:17 -05:00
|
|
|
}
|