Skip to content

Commit 3c2212c

Browse files
committed
Update tests
1 parent 100a431 commit 3c2212c

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

tests/unit/out/refcount/ptr_cast_init.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,15 @@ pub fn main() {
6464
fn main_0() -> i32 {
6565
let text: Value<Box<[u8]>> = Rc::new(RefCell::new(Box::from(*b"hi\0")));
6666
let cp: Value<Ptr<u8>> = Rc::new(RefCell::new((text.as_pointer() as Ptr<u8>)));
67-
let u: Value<Ptr<u8>> = Rc::new(RefCell::new(
68-
((*cp.borrow()).reinterpret_cast::<u8>()).clone(),
69-
));
67+
let u: Value<Ptr<u8>> = Rc::new(RefCell::new((*cp.borrow()).reinterpret_cast::<u8>()));
7068
assert!(((((((*u.borrow()).offset((0) as isize).read()) as i32) == ('h' as i32)) as i32) != 0));
7169
assert!(((((((*u.borrow()).offset((1) as isize).read()) as i32) == ('i' as i32)) as i32) != 0));
7270
let h: Value<header> = Rc::new(RefCell::new(header {
7371
tag: Rc::new(RefCell::new(7)),
7472
size: Rc::new(RefCell::new(32)),
7573
}));
7674
let hp: Value<Ptr<header>> = Rc::new(RefCell::new((h.as_pointer())));
77-
let v: Value<Ptr<view>> = Rc::new(RefCell::new(
78-
((*hp.borrow()).reinterpret_cast::<view>()).clone(),
79-
));
75+
let v: Value<Ptr<view>> = Rc::new(RefCell::new((*hp.borrow()).reinterpret_cast::<view>()));
8076
assert!(((((*(*(*v.borrow()).upgrade().deref()).tag.borrow()) == 7) as i32) != 0));
8177
let data: Value<Box<[u8]>> = Rc::new(RefCell::new(Box::from(*b"hi\0")));
8278
let vp: Value<AnyPtr> = Rc::new(RefCell::new(

0 commit comments

Comments
 (0)