File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ pub unsafe fn check_local_static_5() {
127127 static mut local_p_8: * mut i32 = unsafe { std:: ptr:: null_mut ( ) } ; ;
128128 assert ! ( ( local_outer_6. p1) . is_null( ) ) ;
129129 assert ! ( ( local_outer_6. fn_) . is_none( ) ) ;
130- assert ! ( ( local_fn_7) . is_none( ) ) ;
130+ assert ! ( unsafe { ( & raw const local_fn_7) . as_ref ( ) . unwrap ( ) . is_none( ) } ) ;
131131 assert ! ( ( local_p_8) . is_null( ) ) ;
132132}
133133pub fn main ( ) {
@@ -136,7 +136,7 @@ pub fn main() {
136136 }
137137}
138138unsafe fn main_0 ( ) -> i32 {
139- assert ! ( ( static_fn_0) . is_none( ) ) ;
139+ assert ! ( unsafe { ( & raw const static_fn_0) . as_ref ( ) . unwrap ( ) . is_none( ) } ) ;
140140 assert ! ( ( static_outer_1. p1) . is_null( ) ) ;
141141 assert ! ( ( static_outer_1. p2) . is_null( ) ) ;
142142 assert ! ( ( static_outer_1. cp) . is_null( ) ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ pub unsafe fn set_op_3(mut fn_: Option<unsafe fn(i32) -> i32>) {
1717 g_op_2 = fn_;
1818}
1919pub unsafe fn call_op_4 ( mut x : i32 ) -> i32 {
20- if !( unsafe { ( & raw const g_op_2) . as_ref ( ) . unwrap ( ) . is_none ( ) } ) {
20+ if !unsafe { ( & raw const g_op_2) . as_ref ( ) . unwrap ( ) . is_none ( ) } {
2121 return ( unsafe {
2222 let _arg0: i32 = x;
2323 ( g_op_2) . unwrap ( ) ( _arg0)
@@ -50,11 +50,6 @@ unsafe fn main_0() -> i32 {
5050 set_op_3 ( _fn)
5151 } ) ;
5252 assert ! ( unsafe { ( & raw const g_op_2) . as_ref( ) . unwrap( ) . is_none( ) } ) ;
53- assert ! (
54- ( ( unsafe {
55- let _x: i32 = 5 ;
56- call_op_4( _x)
57- } ) == ( 5 ) )
58- ) ;
53+ assert ! ( ( ( unsafe { call_op_4( 5 , ) } ) == ( 5 ) ) ) ;
5954 return 0 ;
6055}
You can’t perform that action at this time.
0 commit comments