@@ -76,14 +76,20 @@ pub unsafe fn count_4() -> i32 {
7676pub unsafe fn count_7 ( ) -> i32 {
7777 return ( * std:: cell:: LazyCell :: force_mut ( & mut * & raw mut n_9) ) . prefix_inc ( ) ;
7878}
79+ pub unsafe fn count_10 ( ) -> i32 {
80+ return ( * std:: cell:: LazyCell :: force_mut ( & mut * & raw mut n_12) ) . prefix_inc ( ) ;
81+ }
7982static mut t_5: std:: cell:: LazyCell < LifetimeTracked > =
8083 std:: cell:: LazyCell :: new ( || unsafe { LifetimeTracked :: new ( ) } ) ;
8184static mut n_6: std:: cell:: LazyCell < i32 > = std:: cell:: LazyCell :: new ( || unsafe { 0 } ) ;
8285static mut t_8: std:: cell:: LazyCell < LifetimeTracked > =
8386 std:: cell:: LazyCell :: new ( || unsafe { LifetimeTracked :: new ( ) } ) ;
8487static mut n_9: std:: cell:: LazyCell < i32 > = std:: cell:: LazyCell :: new ( || unsafe { 0 } ) ;
85- pub static mut check_10: std:: cell:: LazyCell < AssertsDtorCountAtExit > =
86- std:: cell:: LazyCell :: new ( || unsafe { AssertsDtorCountAtExit { expected : 2 } } ) ;
88+ static mut t_11: std:: cell:: LazyCell < LifetimeTracked > =
89+ std:: cell:: LazyCell :: new ( || unsafe { LifetimeTracked :: new ( ) } ) ;
90+ static mut n_12: std:: cell:: LazyCell < i32 > = std:: cell:: LazyCell :: new ( || unsafe { 0 } ) ;
91+ pub static mut check_13: std:: cell:: LazyCell < AssertsDtorCountAtExit > =
92+ std:: cell:: LazyCell :: new ( || unsafe { AssertsDtorCountAtExit { expected : 4 } } ) ;
8793pub fn main ( ) {
8894 unsafe {
8995 __cpp2rust_init_globals ( ) ;
@@ -93,24 +99,42 @@ pub fn main() {
9399unsafe fn main_0 ( ) -> i32 {
94100 assert ! ( ( ( * std:: cell:: LazyCell :: force_mut( & mut * & raw mut ctorCount_0) ) == ( 0 ) ) ) ;
95101 assert ! ( ( ( unsafe { count_4( ) } ) == ( 1 ) ) ) ;
96- assert ! ( ( ( unsafe { b_count_int_11( ) } ) == ( 2 ) ) ) ;
97- assert ! ( ( ( unsafe { count_4( ) } ) == ( 3 ) ) ) ;
98- assert ! ( ( ( * std:: cell:: LazyCell :: force_mut( & mut * & raw mut ctorCount_0) ) == ( 1 ) ) ) ;
102+ assert ! ( ( ( unsafe { b_count_local_15( ) } ) == ( 1 ) ) ) ;
103+ assert ! ( ( ( unsafe { count_4( ) } ) == ( 2 ) ) ) ;
99104 assert ! ( ( ( unsafe { count_7( ) } ) == ( 1 ) ) ) ;
100- assert ! ( ( ( unsafe { b_count_long_12( ) } ) == ( 2 ) ) ) ;
101- assert ! ( ( ( * std:: cell:: LazyCell :: force_mut( & mut * & raw mut ctorCount_0) ) == ( 2 ) ) ) ;
105+ assert ! ( ( ( unsafe { b_count_int_16( ) } ) == ( 2 ) ) ) ;
106+ assert ! ( ( ( unsafe { count_7( ) } ) == ( 3 ) ) ) ;
107+ assert ! ( ( ( * std:: cell:: LazyCell :: force_mut( & mut * & raw mut ctorCount_0) ) == ( 3 ) ) ) ;
108+ assert ! ( ( ( unsafe { count_10( ) } ) == ( 1 ) ) ) ;
109+ assert ! ( ( ( unsafe { b_count_long_17( ) } ) == ( 2 ) ) ) ;
110+ assert ! ( ( ( * std:: cell:: LazyCell :: force_mut( & mut * & raw mut ctorCount_0) ) == ( 4 ) ) ) ;
102111 return 0 ;
103112}
104- pub unsafe fn b_count_int_11 ( ) -> i32 {
105- return ( unsafe { count_4 ( ) } ) ;
113+ #[ repr( C ) ]
114+ #[ derive( Copy , Clone , VaArg , FnPtrArg , Default ) ]
115+ pub struct S_14 { }
116+ pub unsafe fn count_18 ( ) -> i32 {
117+ return ( * std:: cell:: LazyCell :: force_mut ( & mut * & raw mut n_20) ) . prefix_inc ( ) ;
106118}
107- pub unsafe fn b_count_long_12 ( ) -> i32 {
119+ static mut t_19: std:: cell:: LazyCell < LifetimeTracked > =
120+ std:: cell:: LazyCell :: new ( || unsafe { LifetimeTracked :: new ( ) } ) ;
121+ static mut n_20: std:: cell:: LazyCell < i32 > = std:: cell:: LazyCell :: new ( || unsafe { 0 } ) ;
122+ pub unsafe fn b_count_int_16 ( ) -> i32 {
108123 return ( unsafe { count_7 ( ) } ) ;
109124}
125+ pub unsafe fn b_count_long_17 ( ) -> i32 {
126+ return ( unsafe { count_10 ( ) } ) ;
127+ }
128+ pub unsafe fn b_count_local_15 ( ) -> i32 {
129+ return ( unsafe { count_18 ( ) } ) ;
130+ }
131+ #[ repr( C ) ]
132+ #[ derive( Copy , Clone , VaArg , FnPtrArg , Default ) ]
133+ pub struct S_21 { }
110134pub unsafe fn __cpp2rust_init_globals ( ) {
111135 std:: cell:: LazyCell :: force ( & * & raw const ctorCount_0) ;
112136 std:: cell:: LazyCell :: force ( & * & raw const copyCount_1) ;
113137 std:: cell:: LazyCell :: force ( & * & raw const dtorCount_2) ;
114138 std:: cell:: LazyCell :: force ( & * & raw const useCount_3) ;
115- std:: cell:: LazyCell :: force ( & * & raw const check_10 ) ;
139+ std:: cell:: LazyCell :: force ( & * & raw const check_13 ) ;
116140}
0 commit comments