Skip to content

Commit 4435fc6

Browse files
committed
Update tests
1 parent a661591 commit 4435fc6

2 files changed

Lines changed: 4 additions & 10 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
@@ -111,19 +111,15 @@ pub fn main() {
111111
fn main_0() -> i32 {
112112
let text: Value<Box<[u8]>> = Rc::new(RefCell::new(Box::from(*b"hi\0")));
113113
let cp: Value<Ptr<u8>> = Rc::new(RefCell::new((text.as_pointer() as Ptr<u8>)));
114-
let u: Value<Ptr<u8>> = Rc::new(RefCell::new(
115-
((*cp.borrow()).reinterpret_cast::<u8>()).clone(),
116-
));
114+
let u: Value<Ptr<u8>> = Rc::new(RefCell::new((*cp.borrow()).reinterpret_cast::<u8>()));
117115
assert!(((((((*u.borrow()).offset((0) as isize).read()) as i32) == ('h' as i32)) as i32) != 0));
118116
assert!(((((((*u.borrow()).offset((1) as isize).read()) as i32) == ('i' as i32)) as i32) != 0));
119117
let h: Value<header> = Rc::new(RefCell::new(header {
120118
tag: Rc::new(RefCell::new(7)),
121119
size: Rc::new(RefCell::new(32)),
122120
}));
123121
let hp: Value<Ptr<header>> = Rc::new(RefCell::new((h.as_pointer())));
124-
let v: Value<Ptr<view>> = Rc::new(RefCell::new(
125-
((*hp.borrow()).reinterpret_cast::<view>()).clone(),
126-
));
122+
let v: Value<Ptr<view>> = Rc::new(RefCell::new((*hp.borrow()).reinterpret_cast::<view>()));
127123
assert!(((((*(*(*v.borrow()).upgrade().deref()).tag.borrow()) == 7) as i32) != 0));
128124
let data: Value<Box<[u8]>> = Rc::new(RefCell::new(Box::from(*b"hi\0")));
129125
let vp: Value<AnyPtr> = Rc::new(RefCell::new(

‎tests/unit/out/refcount/union_memset_memcpy.rs‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,17 +230,15 @@ fn main_0() -> i32 {
230230
{
231231
(((*(*c.borrow()).view.borrow())
232232
.raw_()
233-
.reinterpret_cast::<u8>() as Ptr<u8>)
234-
.clone() as Ptr<u8>)
233+
.reinterpret_cast::<u8>() as Ptr<u8>) as Ptr<u8>)
235234
.to_any()
236235
.memcpy(
237236
&((src.as_pointer() as Ptr<u8>) as Ptr<u8>).to_any(),
238237
(*len.borrow()) as usize,
239238
);
240239
(((*(*c.borrow()).view.borrow())
241240
.raw_()
242-
.reinterpret_cast::<u8>() as Ptr<u8>)
243-
.clone() as Ptr<u8>)
241+
.reinterpret_cast::<u8>() as Ptr<u8>) as Ptr<u8>)
244242
.to_any()
245243
.clone()
246244
};

0 commit comments

Comments
 (0)