@@ -6,31 +6,11 @@ use std::io::prelude::*;
66use std:: io:: { Read , Seek , Write } ;
77use std:: os:: fd:: AsFd ;
88use std:: rc:: { Rc , Weak } ;
9- #[ derive( Clone , Copy , PartialEq , Debug , Default ) ]
10- enum anon_0 {
11- #[ default]
12- ALPHA = 7 ,
13- }
14- impl From < i32 > for anon_0 {
15- fn from ( n : i32 ) -> anon_0 {
16- match n {
17- 7 => anon_0:: ALPHA ,
18- _ => panic ! ( "invalid anon_0 value: {}" , n) ,
19- }
20- }
21- }
22- libcc2rs:: impl_enum_inc_dec!( anon_0) ;
23- impl ByteRepr for anon_0 {
24- fn to_bytes ( & self , buf : & mut [ u8 ] ) {
25- ( * self as i32 ) . to_bytes ( buf) ;
26- }
27- fn from_bytes ( buf : & [ u8 ] ) -> Self {
28- <anon_0 >:: from ( i32:: from_bytes ( buf) )
29- }
30- }
9+ pub type anon_0 = u32 ;
10+ pub const anon_0_ALPHA: anon_0 = 7 ;
3111pub fn a_value_1 ( ) -> i32 {
3212 let x: Value < i32 > = Rc :: new ( RefCell :: new ( 0 ) ) ;
33- ( * x. borrow_mut ( ) ) |= ( anon_0 :: ALPHA as i32 ) ;
13+ ( * x. borrow_mut ( ) ) |= ( anon_0_ALPHA as i32 ) ;
3414 return ( * x. borrow ( ) ) ;
3515}
3616pub fn main ( ) {
@@ -41,30 +21,10 @@ fn main_0() -> i32 {
4121 assert ! ( ( ( ( ( { b_value_2( ) } ) == 9 ) as i32 ) != 0 ) ) ;
4222 return 0 ;
4323}
44- #[ derive( Clone , Copy , PartialEq , Debug , Default ) ]
45- enum anon_3 {
46- #[ default]
47- BETA = 9 ,
48- }
49- impl From < i32 > for anon_3 {
50- fn from ( n : i32 ) -> anon_3 {
51- match n {
52- 9 => anon_3:: BETA ,
53- _ => panic ! ( "invalid anon_3 value: {}" , n) ,
54- }
55- }
56- }
57- libcc2rs:: impl_enum_inc_dec!( anon_3) ;
58- impl ByteRepr for anon_3 {
59- fn to_bytes ( & self , buf : & mut [ u8 ] ) {
60- ( * self as i32 ) . to_bytes ( buf) ;
61- }
62- fn from_bytes ( buf : & [ u8 ] ) -> Self {
63- <anon_3 >:: from ( i32:: from_bytes ( buf) )
64- }
65- }
24+ pub type anon_3 = u32 ;
25+ pub const anon_3_BETA: anon_3 = 9 ;
6626pub fn b_value_2 ( ) -> i32 {
6727 let x: Value < i32 > = Rc :: new ( RefCell :: new ( 0 ) ) ;
68- ( * x. borrow_mut ( ) ) |= ( anon_3 :: BETA as i32 ) ;
28+ ( * x. borrow_mut ( ) ) |= ( anon_3_BETA as i32 ) ;
6929 return ( * x. borrow ( ) ) ;
7030}
0 commit comments