2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(unused_assignments)]
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2021-08-25 02:39:40 +02:00
|
|
|
let i: Box<_> = Box::new(1);
|
|
|
|
let mut j: Box<_> = Box::new(2);
|
2011-09-22 13:51:40 -07:00
|
|
|
// Should drop the previous value of j
|
|
|
|
j = i;
|
2013-05-18 22:02:45 -04:00
|
|
|
assert_eq!(*j, 1);
|
2013-02-14 11:47:00 -08:00
|
|
|
}
|