@@ -15,7 +15,7 @@ pub struct Partial {
1515 pub keep : Value < i32 > ,
1616}
1717impl Partial {
18- pub fn Partial ( v : i32 , keep : i32 ) -> Self {
18+ pub fn new ( v : i32 , keep : i32 ) -> Self {
1919 let v: Value < i32 > = Rc :: new ( RefCell :: new ( v) ) ;
2020 let keep: Value < i32 > = Rc :: new ( RefCell :: new ( keep) ) ;
2121 let __this: Value < Partial > = Rc :: new ( RefCell :: new ( Self {
@@ -63,7 +63,7 @@ pub struct NonConstAssign {
6363 pub mark : Value < i32 > ,
6464}
6565impl NonConstAssign {
66- pub fn NonConstAssign ( ) -> Self {
66+ pub fn new ( ) -> Self {
6767 let __this: Value < NonConstAssign > = Rc :: new ( RefCell :: new ( Self {
6868 mark : Rc :: new ( RefCell :: new ( 0 ) ) ,
6969 } ) ) ;
@@ -82,7 +82,7 @@ impl Clone for NonConstAssign {
8282}
8383impl Default for NonConstAssign {
8484 fn default ( ) -> Self {
85- { NonConstAssign :: NonConstAssign ( ) }
85+ { NonConstAssign :: new ( ) }
8686 }
8787}
8888impl ByteRepr for NonConstAssign {
@@ -103,7 +103,7 @@ pub struct RefQualified {
103103 pub mark : Value < i32 > ,
104104}
105105impl RefQualified {
106- pub fn RefQualified ( ) -> Self {
106+ pub fn new ( ) -> Self {
107107 let __this: Value < RefQualified > = Rc :: new ( RefCell :: new ( Self {
108108 mark : Rc :: new ( RefCell :: new ( 0 ) ) ,
109109 } ) ) ;
@@ -122,7 +122,7 @@ impl Clone for RefQualified {
122122}
123123impl Default for RefQualified {
124124 fn default ( ) -> Self {
125- { RefQualified :: RefQualified ( ) }
125+ { RefQualified :: new ( ) }
126126 }
127127}
128128impl ByteRepr for RefQualified {
@@ -193,9 +193,9 @@ pub fn main() {
193193 std:: process:: exit ( main_0 ( ) ) ;
194194}
195195fn main_0 ( ) -> i32 {
196- let a: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: Partial ( { 1 } , { 100 } ) ) ) ;
197- let b: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: Partial ( { 2 } , { 200 } ) ) ) ;
198- let c: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: Partial ( { 3 } , { 300 } ) ) ) ;
196+ let a: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: new ( { 1 } , { 100 } ) ) ) ;
197+ let b: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: new ( { 2 } , { 200 } ) ) ) ;
198+ let c: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: new ( { 3 } , { 300 } ) ) ) ;
199199 ( { PartialImpl :: operator_assign ( & a. as_pointer ( ) , b. as_pointer ( ) ) } ) ;
200200 assert ! ( ( ( * ( * a. borrow( ) ) . v. borrow( ) ) == 2 ) && ( ( * ( * a. borrow( ) ) . keep. borrow( ) ) == 100 ) ) ;
201201 assert ! ( ( assigns_0. with( |rc| * rc. borrow( ) ) == 1 ) ) ;
@@ -213,7 +213,7 @@ fn main_0() -> i32 {
213213 } ) ;
214214 assert ! ( ( assigns_0. with( |rc| * rc. borrow( ) ) == 3 ) ) ;
215215 ( {
216- let _o: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: Partial ( { 9 } , { 900 } ) ) ) ;
216+ let _o: Value < Partial > = Rc :: new ( RefCell :: new ( Partial :: new ( { 9 } , { 900 } ) ) ) ;
217217 PartialImpl :: operator_assign ( & a. as_pointer ( ) , _o. as_pointer ( ) )
218218 } ) ;
219219 assert ! ( ( ( * ( * a. borrow( ) ) . v. borrow( ) ) == 9 ) && ( ( * ( * a. borrow( ) ) . keep. borrow( ) ) == 100 ) ) ;
@@ -232,10 +232,10 @@ fn main_0() -> i32 {
232232 assert ! ( ( ( * ( * a. borrow( ) ) . v. borrow( ) ) == 2 ) ) ;
233233 assert ! ( ( assigns_0. with( |rc| * rc. borrow( ) ) == 6 ) ) ;
234234 let h: Value < Holder > = Rc :: new ( RefCell :: new ( Holder {
235- p : Rc :: new ( RefCell :: new ( Partial :: Partial ( { 4 } , { 40 } ) ) ) ,
235+ p : Rc :: new ( RefCell :: new ( Partial :: new ( { 4 } , { 40 } ) ) ) ,
236236 arr : Rc :: new ( RefCell :: new ( Box :: new ( [
237- Partial :: Partial ( { 5 } , { 50 } ) ,
238- Partial :: Partial ( { 6 } , { 60 } ) ,
237+ Partial :: new ( { 5 } , { 50 } ) ,
238+ Partial :: new ( { 6 } , { 60 } ) ,
239239 ] ) ) ) ,
240240 } ) ) ;
241241 ( { PartialImpl :: operator_assign ( & ( * h. borrow ( ) ) . p . as_pointer ( ) , b. as_pointer ( ) ) } ) ;
@@ -254,18 +254,18 @@ fn main_0() -> i32 {
254254 && ( ( * ( * ( * h. borrow( ) ) . arr. borrow( ) ) [ ( 1 ) as usize ] . keep. borrow( ) ) == 60 )
255255 ) ;
256256 assert ! ( ( assigns_0. with( |rc| * rc. borrow( ) ) == 8 ) ) ;
257- let n: Value < NonConstAssign > = Rc :: new ( RefCell :: new ( NonConstAssign :: NonConstAssign ( ) ) ) ;
258- let n1: Value < NonConstAssign > = Rc :: new ( RefCell :: new ( NonConstAssign :: NonConstAssign ( ) ) ) ;
259- let n2: Value < NonConstAssign > = Rc :: new ( RefCell :: new ( NonConstAssign :: NonConstAssign ( ) ) ) ;
260- let cn: Value < NonConstAssign > = Rc :: new ( RefCell :: new ( NonConstAssign :: NonConstAssign ( ) ) ) ;
257+ let n: Value < NonConstAssign > = Rc :: new ( RefCell :: new ( NonConstAssign :: new ( ) ) ) ;
258+ let n1: Value < NonConstAssign > = Rc :: new ( RefCell :: new ( NonConstAssign :: new ( ) ) ) ;
259+ let n2: Value < NonConstAssign > = Rc :: new ( RefCell :: new ( NonConstAssign :: new ( ) ) ) ;
260+ let cn: Value < NonConstAssign > = Rc :: new ( RefCell :: new ( NonConstAssign :: new ( ) ) ) ;
261261 ( { NonConstAssignImpl :: operator_assign_pmutNonConstAssign ( & n1. as_pointer ( ) , n. as_pointer ( ) ) } ) ;
262262 ( {
263263 NonConstAssignImpl :: operator_assign_pconstNonConstAssign ( & n2. as_pointer ( ) , cn. as_pointer ( ) )
264264 } ) ;
265265 assert ! ( ( ( * ( * n1. borrow( ) ) . mark. borrow( ) ) == 1 ) ) ;
266266 assert ! ( ( ( * ( * n2. borrow( ) ) . mark. borrow( ) ) == 10 ) ) ;
267- let r: Value < RefQualified > = Rc :: new ( RefCell :: new ( RefQualified :: RefQualified ( ) ) ) ;
268- let r1: Value < RefQualified > = Rc :: new ( RefCell :: new ( RefQualified :: RefQualified ( ) ) ) ;
267+ let r: Value < RefQualified > = Rc :: new ( RefCell :: new ( RefQualified :: new ( ) ) ) ;
268+ let r1: Value < RefQualified > = Rc :: new ( RefCell :: new ( RefQualified :: new ( ) ) ) ;
269269 ( { RefQualifiedImpl :: operator_assign ( & r1. as_pointer ( ) , r. as_pointer ( ) ) } ) ;
270270 assert ! ( ( ( * ( * r1. borrow( ) ) . mark. borrow( ) ) == 1 ) ) ;
271271 return 0 ;
0 commit comments