File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -174,20 +174,18 @@ mod tests {
174174 #[ test]
175175 fn stack_alignment ( ) {
176176 extern "C" fn context_function ( t : Transfer ) -> ! {
177- let i = [ 0u8 ; 512 ] ;
178- assert_eq ! ( & i as * const _ as usize % 16 , 0 ) ;
179-
180- t. context . resume ( 0 ) ;
177+ let i: [ u8 ; 512 ] = unsafe { mem:: uninitialized ( ) } ;
178+ t. context . resume ( & i as * const _ as usize % 16 ) ;
181179 unreachable ! ( ) ;
182180 }
183181
184182 let stack = ProtectedFixedSizeStack :: default ( ) ;
185183 assert_eq ! ( stack. top( ) as usize % 16 , 0 ) ;
186184 assert_eq ! ( stack. bottom( ) as usize % 16 , 0 ) ;
187185
188- let t = Transfer :: new ( Context :: new ( & stack, context_function) , 0 ) ;
189-
190- t . context . resume ( 0 ) ;
186+ let mut t = Transfer :: new ( Context :: new ( & stack, context_function) , 0 ) ;
187+ t = t . context . resume ( 0 ) ;
188+ assert_eq ! ( t . data , 0 ) ;
191189 }
192190
193191 #[ test]
You can’t perform that action at this time.
0 commit comments