@@ -11,6 +11,14 @@ pub struct Named {
1111 pub a : Value < i32 > ,
1212 pub b : Value < i32 > ,
1313}
14+ impl Clone for Named {
15+ fn clone ( & self ) -> Self {
16+ Self {
17+ a : Rc :: new ( RefCell :: new ( ( * self . a . borrow ( ) ) . clone ( ) ) ) ,
18+ b : Rc :: new ( RefCell :: new ( ( * self . b . borrow ( ) ) . clone ( ) ) ) ,
19+ }
20+ }
21+ }
1422impl ByteRepr for Named {
1523 fn byte_size ( ) -> usize {
1624 8
@@ -31,6 +39,14 @@ pub struct anon_0 {
3139 pub c : Value < i32 > ,
3240 pub d : Value < i32 > ,
3341}
42+ impl Clone for anon_0 {
43+ fn clone ( & self ) -> Self {
44+ Self {
45+ c : Rc :: new ( RefCell :: new ( ( * self . c . borrow ( ) ) . clone ( ) ) ) ,
46+ d : Rc :: new ( RefCell :: new ( ( * self . d . borrow ( ) ) . clone ( ) ) ) ,
47+ }
48+ }
49+ }
3450impl ByteRepr for anon_0 {
3551 fn byte_size ( ) -> usize {
3652 8
@@ -51,6 +67,14 @@ pub struct anon_1 {
5167 pub g : Value < i32 > ,
5268 pub h : Value < i32 > ,
5369}
70+ impl Clone for anon_1 {
71+ fn clone ( & self ) -> Self {
72+ Self {
73+ g : Rc :: new ( RefCell :: new ( ( * self . g . borrow ( ) ) . clone ( ) ) ) ,
74+ h : Rc :: new ( RefCell :: new ( ( * self . h . borrow ( ) ) . clone ( ) ) ) ,
75+ }
76+ }
77+ }
5478impl ByteRepr for anon_1 {
5579 fn byte_size ( ) -> usize {
5680 8
@@ -71,6 +95,14 @@ pub struct anon_2 {
7195 pub e : Value < i32 > ,
7296 pub f : Value < i32 > ,
7397}
98+ impl Clone for anon_2 {
99+ fn clone ( & self ) -> Self {
100+ Self {
101+ e : Rc :: new ( RefCell :: new ( ( * self . e . borrow ( ) ) . clone ( ) ) ) ,
102+ f : Rc :: new ( RefCell :: new ( ( * self . f . borrow ( ) ) . clone ( ) ) ) ,
103+ }
104+ }
105+ }
74106impl ByteRepr for anon_2 {
75107 fn byte_size ( ) -> usize {
76108 8
@@ -90,6 +122,13 @@ impl ByteRepr for anon_2 {
90122pub struct anon_4 {
91123 pub j : Value < i32 > ,
92124}
125+ impl Clone for anon_4 {
126+ fn clone ( & self ) -> Self {
127+ Self {
128+ j : Rc :: new ( RefCell :: new ( ( * self . j . borrow ( ) ) . clone ( ) ) ) ,
129+ }
130+ }
131+ }
93132impl ByteRepr for anon_4 {
94133 fn byte_size ( ) -> usize {
95134 4
@@ -107,6 +146,13 @@ impl ByteRepr for anon_4 {
107146pub struct anon_5 {
108147 pub k : Value < i32 > ,
109148}
149+ impl Clone for anon_5 {
150+ fn clone ( & self ) -> Self {
151+ Self {
152+ k : Rc :: new ( RefCell :: new ( ( * self . k . borrow ( ) ) . clone ( ) ) ) ,
153+ }
154+ }
155+ }
110156impl ByteRepr for anon_5 {
111157 fn byte_size ( ) -> usize {
112158 4
@@ -126,6 +172,15 @@ pub struct anon_3 {
126172 pub inner_named : Value < anon_4 > ,
127173 pub anon_5 : Value < anon_5 > ,
128174}
175+ impl Clone for anon_3 {
176+ fn clone ( & self ) -> Self {
177+ Self {
178+ i : Rc :: new ( RefCell :: new ( ( * self . i . borrow ( ) ) . clone ( ) ) ) ,
179+ inner_named : Rc :: new ( RefCell :: new ( ( * self . inner_named . borrow ( ) ) . clone ( ) ) ) ,
180+ anon_5 : Rc :: new ( RefCell :: new ( ( * self . anon_5 . borrow ( ) ) . clone ( ) ) ) ,
181+ }
182+ }
183+ }
129184impl ByteRepr for anon_3 {
130185 fn byte_size ( ) -> usize {
131186 12
@@ -151,6 +206,17 @@ pub struct Outer {
151206 pub anon_2 : Value < anon_2 > ,
152207 pub anon_3 : Value < anon_3 > ,
153208}
209+ impl Clone for Outer {
210+ fn clone ( & self ) -> Self {
211+ Self {
212+ named : Rc :: new ( RefCell :: new ( ( * self . named . borrow ( ) ) . clone ( ) ) ) ,
213+ anon0 : Rc :: new ( RefCell :: new ( ( * self . anon0 . borrow ( ) ) . clone ( ) ) ) ,
214+ anon1 : Rc :: new ( RefCell :: new ( ( * self . anon1 . borrow ( ) ) . clone ( ) ) ) ,
215+ anon_2 : Rc :: new ( RefCell :: new ( ( * self . anon_2 . borrow ( ) ) . clone ( ) ) ) ,
216+ anon_3 : Rc :: new ( RefCell :: new ( ( * self . anon_3 . borrow ( ) ) . clone ( ) ) ) ,
217+ }
218+ }
219+ }
154220impl ByteRepr for Outer {
155221 fn byte_size ( ) -> usize {
156222 44
@@ -229,6 +295,14 @@ fn main_0() -> i32 {
229295 pub x : Value < i32 > ,
230296 pub z : Value < i32 > ,
231297 }
298+ impl Clone for anon_6 {
299+ fn clone ( & self ) -> Self {
300+ Self {
301+ x : Rc :: new ( RefCell :: new ( ( * self . x . borrow ( ) ) . clone ( ) ) ) ,
302+ z : Rc :: new ( RefCell :: new ( ( * self . z . borrow ( ) ) . clone ( ) ) ) ,
303+ }
304+ }
305+ }
232306 impl ByteRepr for anon_6 {
233307 fn byte_size ( ) -> usize {
234308 8
0 commit comments