@@ -45,23 +45,23 @@ impl From<i32> for Option {
4545}
4646libcc2rs:: impl_enum_inc_dec!( Option ) ;
4747#[ derive( Clone , Copy , PartialEq , Debug , Default ) ]
48- enum Tag {
48+ enum Tag_enum {
4949 #[ default]
5050 TAG_ZERO = 0 ,
5151 TAG_ONE = 1 ,
5252 TAG_TWO = 2 ,
5353}
54- impl From < i32 > for Tag {
55- fn from ( n : i32 ) -> Tag {
54+ impl From < i32 > for Tag_enum {
55+ fn from ( n : i32 ) -> Tag_enum {
5656 match n {
57- 0 => Tag :: TAG_ZERO ,
58- 1 => Tag :: TAG_ONE ,
59- 2 => Tag :: TAG_TWO ,
60- _ => panic ! ( "invalid Tag value: {}" , n) ,
57+ 0 => Tag_enum :: TAG_ZERO ,
58+ 1 => Tag_enum :: TAG_ONE ,
59+ 2 => Tag_enum :: TAG_TWO ,
60+ _ => panic ! ( "invalid Tag_enum value: {}" , n) ,
6161 }
6262 }
6363}
64- libcc2rs:: impl_enum_inc_dec!( Tag ) ;
64+ libcc2rs:: impl_enum_inc_dec!( Tag_enum ) ;
6565#[ derive( Default ) ]
6666pub struct Entry {
6767 pub name : Value < Ptr < u8 > > ,
@@ -76,7 +76,7 @@ thread_local!(
7676 pub static global_opt_1: Value <Option > = Rc :: new( RefCell :: new( Option :: OPT_B ) ) ;
7777) ;
7878thread_local ! (
79- pub static global_tag_2: Value <Tag > = Rc :: new( RefCell :: new( Tag :: TAG_TWO ) ) ;
79+ pub static global_tag_2: Value <Tag_enum > = Rc :: new( RefCell :: new( Tag_enum :: TAG_TWO ) ) ;
8080) ;
8181thread_local ! (
8282 pub static entries_3: Value <Box <[ Entry ] >> = Rc :: new( RefCell :: new( Box :: new( [
@@ -199,17 +199,17 @@ fn main_0() -> i32 {
199199 classify_option_5 ( _option)
200200 } ) ;
201201 assert ! ( ( ( ( ( * rc. borrow( ) ) == 3 ) as i32 ) != 0 ) ) ;
202- let t: Value < Tag > = Rc :: new ( RefCell :: new ( Tag :: TAG_ONE ) ) ;
202+ let t: Value < Tag_enum > = Rc :: new ( RefCell :: new ( Tag_enum :: TAG_ONE ) ) ;
203203 assert ! ( ( ( ( ( ( * t. borrow( ) ) as u32 ) == 1_u32 ) as i32 ) != 0 ) ) ;
204- assert ! ( ( ( ( ( ( * t. borrow( ) ) as u32 ) == ( ( Tag :: TAG_ONE as i32 ) as u32 ) ) as i32 ) != 0 ) ) ;
204+ assert ! ( ( ( ( ( ( * t. borrow( ) ) as u32 ) == ( ( Tag_enum :: TAG_ONE as i32 ) as u32 ) ) as i32 ) != 0 ) ) ;
205205 let ti: Value < i32 > = Rc :: new ( RefCell :: new ( ( ( * t. borrow ( ) ) as i32 ) . clone ( ) ) ) ;
206206 assert ! ( ( ( ( ( * ti. borrow( ) ) == 1 ) as i32 ) != 0 ) ) ;
207- ( * t. borrow_mut ( ) ) = Tag :: from ( 2 ) ;
208- assert ! ( ( ( ( ( ( * t. borrow( ) ) as u32 ) == ( ( Tag :: TAG_TWO as i32 ) as u32 ) ) as i32 ) != 0 ) ) ;
207+ ( * t. borrow_mut ( ) ) = Tag_enum :: from ( 2 ) ;
208+ assert ! ( ( ( ( ( ( * t. borrow( ) ) as u32 ) == ( ( Tag_enum :: TAG_TWO as i32 ) as u32 ) ) as i32 ) != 0 ) ) ;
209209 ' switch: {
210210 let __match_cond = ( ( * t. borrow ( ) ) as u32 ) ;
211211 match __match_cond {
212- v if v == ( ( Tag :: TAG_ZERO as i32 ) as u32 ) => {
212+ v if v == ( ( Tag_enum :: TAG_ZERO as i32 ) as u32 ) => {
213213 return 90 ;
214214 }
215215 v if v == ( 1 as u32 ) => {
@@ -236,8 +236,8 @@ fn main_0() -> i32 {
236236 != 0 )
237237 ) ;
238238 assert ! (
239- ( ( ( ( ( * global_tag_2. with( Value :: clone) . borrow( ) ) as u32 ) == ( ( Tag :: TAG_TWO as i32 ) as u32 ) )
240- as i32 )
239+ ( ( ( ( ( * global_tag_2. with( Value :: clone) . borrow( ) ) as u32 )
240+ == ( ( Tag_enum :: TAG_TWO as i32 ) as u32 ) ) as i32 )
241241 != 0 )
242242 ) ;
243243 assert ! (
0 commit comments