@@ -25,7 +25,7 @@ impl Partial {
2525 let this: Ptr < Partial > = __this. as_pointer ( ) ;
2626 Rc :: try_unwrap ( __this) . ok ( ) . unwrap ( ) . into_inner ( )
2727 }
28- pub fn Partial_pconstPartial ( o : Ptr < Partial > ) -> Self {
28+ pub fn copy_from ( o : Ptr < Partial > ) -> Self {
2929 let __this: Value < Partial > = Rc :: new ( RefCell :: new ( Self {
3030 v : Rc :: new ( RefCell :: new ( ( * ( * o. upgrade ( ) . deref ( ) ) . v . borrow ( ) ) ) ) ,
3131 keep : Rc :: new ( RefCell :: new ( ( * ( * o. upgrade ( ) . deref ( ) ) . keep . borrow ( ) ) ) ) ,
@@ -40,7 +40,7 @@ impl Clone for Partial {
4040 v : self . v . clone ( ) ,
4141 keep : self . keep . clone ( ) ,
4242 } ) ) ;
43- Partial :: Partial_pconstPartial ( __src. as_pointer ( ) )
43+ Partial :: copy_from ( __src. as_pointer ( ) )
4444 }
4545}
4646impl ByteRepr for Partial {
@@ -146,14 +146,10 @@ pub struct Holder {
146146impl Clone for Holder {
147147 fn clone ( & self ) -> Self {
148148 let __this: Value < Holder > = Rc :: new ( RefCell :: new ( Self {
149- p : Rc :: new ( RefCell :: new ( Partial :: Partial_pconstPartial ( {
150- self . p . as_pointer ( )
151- } ) ) ) ,
149+ p : Rc :: new ( RefCell :: new ( Partial :: copy_from ( { self . p . as_pointer ( ) } ) ) ) ,
152150 arr : Rc :: new ( RefCell :: new ( Box :: new ( std:: array:: from_fn :: < _ , 2 , _ > (
153151 |__i : usize | {
154- Partial :: Partial_pconstPartial ( {
155- ( self . arr . as_pointer ( ) as Ptr < Partial > ) . offset ( __i)
156- } )
152+ Partial :: copy_from ( { ( self . arr . as_pointer ( ) as Ptr < Partial > ) . offset ( __i) } )
157153 } ,
158154 ) ) ) ) ,
159155 } ) ) ;
@@ -196,38 +192,38 @@ fn main_0() -> i32 {
196192 let a: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: new ( { 1 } , { 100 } ) ) ) ;
197193 let b: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: new ( { 2 } , { 200 } ) ) ) ;
198194 let c: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: new ( { 3 } , { 300 } ) ) ) ;
199- ( { PartialImpl :: operator_assign ( & a. as_pointer ( ) , b. as_pointer ( ) ) } ) ;
195+ ( { PartialImpl :: copy_assign ( & a. as_pointer ( ) , b. as_pointer ( ) ) } ) ;
200196 assert ! ( ( ( * ( * a. borrow( ) ) . v. borrow( ) ) == 2 ) && ( ( * ( * a. borrow( ) ) . keep. borrow( ) ) == 100 ) ) ;
201197 assert ! ( ( assigns_0. with( |rc| * rc. borrow( ) ) == 1 ) ) ;
202198 ( {
203- PartialImpl :: operator_assign (
199+ PartialImpl :: copy_assign (
204200 & c. as_pointer ( ) ,
205- ( { PartialImpl :: operator_assign ( & a. as_pointer ( ) , b. as_pointer ( ) ) } ) ,
201+ ( { PartialImpl :: copy_assign ( & a. as_pointer ( ) , b. as_pointer ( ) ) } ) ,
206202 )
207203 } ) ;
208204 assert ! ( ( ( * ( * c. borrow( ) ) . v. borrow( ) ) == 2 ) && ( ( * ( * c. borrow( ) ) . keep. borrow( ) ) == 300 ) ) ;
209205 assert ! ( ( assigns_0. with( |rc| * rc. borrow( ) ) == 3 ) ) ;
210206 ( {
211207 let _o: Ptr < Partial > = a. as_pointer ( ) ;
212- PartialImpl :: operator_assign ( & a. as_pointer ( ) , _o)
208+ PartialImpl :: copy_assign ( & a. as_pointer ( ) , _o)
213209 } ) ;
214210 assert ! ( ( assigns_0. with( |rc| * rc. borrow( ) ) == 3 ) ) ;
215211 ( {
216212 let _o: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: new ( { 9 } , { 900 } ) ) ) ;
217- PartialImpl :: operator_assign ( & a. as_pointer ( ) , _o. as_pointer ( ) )
213+ PartialImpl :: copy_assign ( & a. as_pointer ( ) , _o. as_pointer ( ) )
218214 } ) ;
219215 assert ! ( ( ( * ( * a. borrow( ) ) . v. borrow( ) ) == 9 ) && ( ( * ( * a. borrow( ) ) . keep. borrow( ) ) == 100 ) ) ;
220216 assert ! ( ( assigns_0. with( |rc| * rc. borrow( ) ) == 4 ) ) ;
221217 let ra: Ptr < Partial > = a. as_pointer ( ) ;
222218 ( {
223219 let _o: Ptr < Partial > = c. as_pointer ( ) ;
224- PartialImpl :: operator_assign ( & ra, _o)
220+ PartialImpl :: copy_assign ( & ra, _o)
225221 } ) ;
226222 assert ! ( ( ( * ( * a. borrow( ) ) . v. borrow( ) ) == 2 ) ) ;
227223 let pa: Value < Ptr < Partial > > = Rc :: new ( RefCell :: new ( ( a. as_pointer ( ) ) ) ) ;
228224 ( {
229225 let _o: Ptr < Partial > = b. as_pointer ( ) ;
230- PartialImpl :: operator_assign ( & ( * pa. borrow ( ) ) , _o)
226+ PartialImpl :: copy_assign ( & ( * pa. borrow ( ) ) , _o)
231227 } ) ;
232228 assert ! ( ( ( * ( * a. borrow( ) ) . v. borrow( ) ) == 2 ) ) ;
233229 assert ! ( ( assigns_0. with( |rc| * rc. borrow( ) ) == 6 ) ) ;
@@ -238,9 +234,9 @@ fn main_0() -> i32 {
238234 Partial :: new ( { 6 } , { 60 } ) ,
239235 ] ) ) ) ,
240236 } ) ) ;
241- ( { PartialImpl :: operator_assign ( & ( * h. borrow ( ) ) . p . as_pointer ( ) , b. as_pointer ( ) ) } ) ;
237+ ( { PartialImpl :: copy_assign ( & ( * h. borrow ( ) ) . p . as_pointer ( ) , b. as_pointer ( ) ) } ) ;
242238 ( {
243- PartialImpl :: operator_assign (
239+ PartialImpl :: copy_assign (
244240 & ( ( * h. borrow ( ) ) . arr . as_pointer ( ) as Ptr < Partial > ) . offset ( 1 ) ,
245241 c. as_pointer ( ) ,
246242 )
@@ -266,7 +262,7 @@ fn main_0() -> i32 {
266262 assert ! ( ( ( * ( * n2. borrow( ) ) . mark. borrow( ) ) == 10 ) ) ;
267263 let r: Value < RefQualified > = Rc :: new ( RefCell :: new ( RefQualified :: new ( ) ) ) ;
268264 let r1: Value < RefQualified > = Rc :: new ( RefCell :: new ( RefQualified :: new ( ) ) ) ;
269- ( { RefQualifiedImpl :: operator_assign ( & r1. as_pointer ( ) , r. as_pointer ( ) ) } ) ;
265+ ( { RefQualifiedImpl :: copy_assign ( & r1. as_pointer ( ) , r. as_pointer ( ) ) } ) ;
270266 assert ! ( ( ( * ( * r1. borrow( ) ) . mark. borrow( ) ) == 1 ) ) ;
271267 return 0 ;
272268}
@@ -287,10 +283,10 @@ impl NonConstAssignImpl for Ptr<NonConstAssign> {
287283 }
288284}
289285pub trait PartialImpl {
290- fn operator_assign ( & self , o : Ptr < Partial > ) -> Ptr < Partial > ;
286+ fn copy_assign ( & self , o : Ptr < Partial > ) -> Ptr < Partial > ;
291287}
292288impl PartialImpl for Ptr < Partial > {
293- fn operator_assign ( & self , o : Ptr < Partial > ) -> Ptr < Partial > {
289+ fn copy_assign ( & self , o : Ptr < Partial > ) -> Ptr < Partial > {
294290 if ( ( * self ) == ( o) ) {
295291 return ( * self ) . clone ( ) ;
296292 }
@@ -301,10 +297,10 @@ impl PartialImpl for Ptr<Partial> {
301297 }
302298}
303299pub trait RefQualifiedImpl {
304- fn operator_assign ( & self , o : Ptr < RefQualified > ) -> Ptr < RefQualified > ;
300+ fn copy_assign ( & self , o : Ptr < RefQualified > ) -> Ptr < RefQualified > ;
305301}
306302impl RefQualifiedImpl for Ptr < RefQualified > {
307- fn operator_assign ( & self , o : Ptr < RefQualified > ) -> Ptr < RefQualified > {
303+ fn copy_assign ( & self , o : Ptr < RefQualified > ) -> Ptr < RefQualified > {
308304 let __rhs = ( ( * ( * o. upgrade ( ) . deref ( ) ) . mark . borrow ( ) ) + 1 ) ;
309305 ( * ( * ( * self ) . upgrade ( ) . deref ( ) ) . mark . borrow_mut ( ) ) = __rhs;
310306 return ( * self ) . clone ( ) ;
0 commit comments