]> git.lizzy.rs Git - rust.git/blob - tests/ui/functional-struct-update/functional-struct-update-noncopyable.rs
Rollup merge of #106664 - chenyukang:yukang/fix-106597-remove-lseek, r=cuviper
[rust.git] / tests / ui / functional-struct-update / functional-struct-update-noncopyable.rs
1 // issue 7327
2
3 use std::sync::Arc;
4
5 struct A { y: Arc<isize>, x: Arc<isize> }
6
7 impl Drop for A {
8     fn drop(&mut self) { println!("x={}", *self.x); }
9 }
10 fn main() {
11     let a = A { y: Arc::new(1), x: Arc::new(2) };
12     let _b = A { y: Arc::new(3), ..a }; //~ ERROR cannot move out of type `A`
13     let _c = a;
14 }