]> git.proxmox.com Git - rustc.git/blame - tests/ui/box/unit/unique-decl-init-copy.rs
Merge 1.70 into proxmox/bookworm
[rustc.git] / tests / ui / box / unit / unique-decl-init-copy.rs
CommitLineData
b7449926 1// run-pass
1a4d82fc 2
223e47cc 3pub fn main() {
c295e0f8 4 let mut i: Box<_> = Box::new(1);
223e47cc
LB
5 // Should be a copy
6 let mut j = i.clone();
85aaf69f
SL
7 *i = 2;
8 *j = 3;
9 assert_eq!(*i, 2);
10 assert_eq!(*j, 3);
223e47cc 11}