]> git.proxmox.com Git - rustc.git/blame - src/test/ui/unique/unique-decl-init-copy.rs
New upstream version 1.56.0+dfsg1
[rustc.git] / src / test / ui / unique / unique-decl-init-copy.rs
CommitLineData
b7449926 1// run-pass
1a4d82fc
JJ
2#![feature(box_syntax)]
3
223e47cc 4pub fn main() {
c34b1796 5 let mut i: Box<_> = box 1;
223e47cc
LB
6 // Should be a copy
7 let mut j = i.clone();
85aaf69f
SL
8 *i = 2;
9 *j = 3;
10 assert_eq!(*i, 2);
11 assert_eq!(*j, 3);
223e47cc 12}