]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unique/unique-decl-init-copy.rs
Rollup merge of #88789 - the8472:rm-zip-bound, r=JohnTitor
[rust.git] / src / test / ui / unique / unique-decl-init-copy.rs
1 // run-pass
2
3 pub fn main() {
4     let mut i: Box<_> = Box::new(1);
5     // Should be a copy
6     let mut j = i.clone();
7     *i = 2;
8     *j = 3;
9     assert_eq!(*i, 2);
10     assert_eq!(*j, 3);
11 }