@@ -235,6 +235,36 @@ impl ByteRepr for Outer_long__Inner_int_ {
235235 }
236236}
237237#[ derive( Default ) ]
238+ pub struct Outer_long__Inner_char_ {
239+ pub t : Value < i64 > ,
240+ pub u : Value < u8 > ,
241+ }
242+ impl Clone for Outer_long__Inner_char_ {
243+ fn clone ( & self ) -> Self {
244+ let __this: Value < Outer_long__Inner_char_ > = Rc :: new ( RefCell :: new ( Self {
245+ t : Rc :: new ( RefCell :: new ( ( * self . t . borrow ( ) ) ) ) ,
246+ u : Rc :: new ( RefCell :: new ( ( * self . u . borrow ( ) ) ) ) ,
247+ } ) ) ;
248+ let this: Ptr < Outer_long__Inner_char_ > = __this. as_pointer ( ) ;
249+ Rc :: try_unwrap ( __this) . ok ( ) . unwrap ( ) . into_inner ( )
250+ }
251+ }
252+ impl ByteRepr for Outer_long__Inner_char_ {
253+ fn byte_size ( ) -> usize {
254+ 16
255+ }
256+ fn to_bytes ( & self , buf : & mut [ u8 ] ) {
257+ ( * self . t . borrow ( ) ) . to_bytes ( & mut buf[ 0 ..8 ] ) ;
258+ ( * self . u . borrow ( ) ) . to_bytes ( & mut buf[ 8 ..9 ] ) ;
259+ }
260+ fn from_bytes ( buf : & [ u8 ] ) -> Self {
261+ Self {
262+ t : Rc :: new ( RefCell :: new ( <i64 >:: from_bytes ( & buf[ 0 ..8 ] ) ) ) ,
263+ u : Rc :: new ( RefCell :: new ( <u8 >:: from_bytes ( & buf[ 8 ..9 ] ) ) ) ,
264+ }
265+ }
266+ }
267+ #[ derive( Default ) ]
238268pub struct Outer_long_ {
239269 pub v : Value < i64 > ,
240270}
@@ -296,7 +326,7 @@ fn main_0() -> i32 {
296326 } ) == 7 )
297327 ) ;
298328 assert ! (
299- ( ( { Outer_long__Inner_int_Impl :: sum( & ic. as_pointer( ) , ) } ) == ( 6 + ( ( 'a' as u8 ) as i32 ) ) )
329+ ( ( { Outer_long__Inner_char_Impl :: sum( & ic. as_pointer( ) , ) } ) == ( 6 + ( ( 'a' as u8 ) as i32 ) ) )
300330 ) ;
301331 assert ! ( ( ( { Boxed_int_ :: twice( 3 , ) } ) == 6 ) ) ;
302332 let bi: Value < Boxed_int_ > = Rc :: new ( RefCell :: new ( Boxed_int_ {
@@ -491,14 +521,19 @@ impl Outer_long_Impl for Ptr<Outer_long_> {
491521 } ;
492522 }
493523}
494- pub trait Outer_long__Inner_int_Impl {
524+ pub trait Outer_long__Inner_char_Impl {
495525 fn sum ( & self ) -> i32 ;
496526}
497- impl Outer_long__Inner_int_Impl for Ptr < Outer_long__Inner_int_ > {
527+ impl Outer_long__Inner_char_Impl for Ptr < Outer_long__Inner_char_ > {
498528 fn sum ( & self ) -> i32 {
499529 return ( ( ( * ( * ( * self ) . upgrade ( ) . deref ( ) ) . t . borrow ( ) ) as i32 )
500530 + ( ( * ( * ( * self ) . upgrade ( ) . deref ( ) ) . u . borrow ( ) ) as i32 ) ) ;
501531 }
532+ }
533+ pub trait Outer_long__Inner_int_Impl {
534+ fn sum ( & self ) -> i32 ;
535+ }
536+ impl Outer_long__Inner_int_Impl for Ptr < Outer_long__Inner_int_ > {
502537 fn sum ( & self ) -> i32 {
503538 return ( ( ( * ( * ( * self ) . upgrade ( ) . deref ( ) ) . t . borrow ( ) ) as i32 )
504539 + ( ( * ( * ( * self ) . upgrade ( ) . deref ( ) ) . u . borrow ( ) ) as i32 ) ) ;
0 commit comments