@@ -219,66 +219,66 @@ pub fn check_local_static_5() {
219219 thread_local ! (
220220 static local_p_8: Value <Ptr <i32 >> = Rc :: new( RefCell :: new( Ptr :: <i32 >:: null( ) ) ) ;
221221 ) ;
222- assert ! ( ( * local_outer_6. with( |rc| rc . borrow ( ) . clone ( ) ) . p1. borrow( ) ) . is_null( ) ) ;
223- assert ! ( ( * local_outer_6. with( |rc| rc . borrow ( ) . clone ( ) ) . fn_. borrow( ) ) . is_null( ) ) ;
224- assert ! ( ( local_fn_7. with( |rc| rc . borrow( ) . clone ( ) ) ) . is_null( ) ) ;
225- assert ! ( ( local_p_8. with( |rc| rc . borrow( ) . clone ( ) ) ) . is_null( ) ) ;
222+ assert ! ( ( * ( * local_outer_6. with( Value :: clone ) . borrow ( ) ) . p1. borrow( ) ) . is_null( ) ) ;
223+ assert ! ( ( * ( * local_outer_6. with( Value :: clone ) . borrow ( ) ) . fn_. borrow( ) ) . is_null( ) ) ;
224+ assert ! ( ( * local_fn_7. with( Value :: clone ) . borrow( ) ) . is_null( ) ) ;
225+ assert ! ( ( * local_p_8. with( Value :: clone ) . borrow( ) ) . is_null( ) ) ;
226226}
227227pub fn main ( ) {
228228 __cpp2rust_init_globals ( ) ;
229229 std:: process:: exit ( main_0 ( ) ) ;
230230}
231231fn main_0 ( ) -> i32 {
232- assert ! ( ( static_fn_0. with( |rc| rc . borrow( ) . clone ( ) ) ) . is_null( ) ) ;
233- assert ! ( ( * static_outer_1. with( |rc| rc . borrow ( ) . clone ( ) ) . p1. borrow( ) ) . is_null( ) ) ;
234- assert ! ( ( * static_outer_1. with( |rc| rc . borrow ( ) . clone ( ) ) . p2. borrow( ) ) . is_null( ) ) ;
235- assert ! ( ( * static_outer_1. with( |rc| rc . borrow ( ) . clone ( ) ) . cp. borrow( ) ) . is_null( ) ) ;
236- assert ! ( ( * static_outer_1. with( |rc| rc . borrow ( ) . clone ( ) ) . pp. borrow( ) ) . is_null( ) ) ;
237- assert ! ( ( * static_outer_1. with( |rc| rc . borrow ( ) . clone ( ) ) . fn_. borrow( ) ) . is_null( ) ) ;
232+ assert ! ( ( * static_fn_0. with( Value :: clone ) . borrow( ) ) . is_null( ) ) ;
233+ assert ! ( ( * ( * static_outer_1. with( Value :: clone ) . borrow ( ) ) . p1. borrow( ) ) . is_null( ) ) ;
234+ assert ! ( ( * ( * static_outer_1. with( Value :: clone ) . borrow ( ) ) . p2. borrow( ) ) . is_null( ) ) ;
235+ assert ! ( ( * ( * static_outer_1. with( Value :: clone ) . borrow ( ) ) . cp. borrow( ) ) . is_null( ) ) ;
236+ assert ! ( ( * ( * static_outer_1. with( Value :: clone ) . borrow ( ) ) . pp. borrow( ) ) . is_null( ) ) ;
237+ assert ! ( ( * ( * static_outer_1. with( Value :: clone ) . borrow ( ) ) . fn_. borrow( ) ) . is_null( ) ) ;
238238 let i: Value < i32 > = Rc :: new ( RefCell :: new ( 0 ) ) ;
239239 ' loop_: while ( ( * i. borrow ( ) ) < 3 ) {
240240 assert ! (
241- ( ( * static_outer_1. with( |rc| rc . borrow ( ) . clone ( ) ) . arr. borrow( ) ) [ ( * i. borrow( ) ) as usize ] )
241+ ( ( * ( * static_outer_1. with( Value :: clone ) . borrow ( ) ) . arr. borrow( ) ) [ ( * i. borrow( ) ) as usize ] )
242242 . is_null( )
243243 ) ;
244244 ( * i. borrow_mut ( ) ) . prefix_inc ( ) ;
245245 }
246246 assert ! (
247- ( * ( * static_outer_1. with( |rc| rc . borrow ( ) . clone ( ) ) . inner. borrow( ) )
247+ ( * ( * ( * static_outer_1. with( Value :: clone ) . borrow ( ) ) . inner. borrow( ) )
248248 . name
249249 . borrow( ) )
250250 . is_null( )
251251 ) ;
252252 let i: Value < i32 > = Rc :: new ( RefCell :: new ( 0 ) ) ;
253253 ' loop_: while ( ( * i. borrow ( ) ) < 2 ) {
254254 assert ! (
255- ( * static_inner_array_2. with( |rc| rc . borrow ( ) . clone ( ) ) [ ( * i. borrow( ) ) as usize ]
255+ ( * ( * static_inner_array_2. with( Value :: clone ) . borrow ( ) ) [ ( * i. borrow( ) ) as usize ]
256256 . name
257257 . borrow( ) )
258258 . is_null( )
259259 ) ;
260260 ( * i. borrow_mut ( ) ) . prefix_inc ( ) ;
261261 }
262- assert ! ( ( * static_foo_3. with( |rc| rc . borrow ( ) . clone ( ) ) . s2. borrow( ) ) . is_null( ) ) ;
263- assert ! ( ( * static_foo_3. with( |rc| rc . borrow ( ) . clone ( ) ) . fn1. borrow( ) ) . is_null( ) ) ;
264- assert ! ( ( * static_foo_3. with( |rc| rc . borrow ( ) . clone ( ) ) . fn2. borrow( ) ) . is_null( ) ) ;
265- assert ! ( ( ( * static_foo_3. with( |rc| rc . borrow ( ) . clone ( ) ) . n. borrow( ) ) == 42 ) ) ;
262+ assert ! ( ( * ( * static_foo_3. with( Value :: clone ) . borrow ( ) ) . s2. borrow( ) ) . is_null( ) ) ;
263+ assert ! ( ( * ( * static_foo_3. with( Value :: clone ) . borrow ( ) ) . fn1. borrow( ) ) . is_null( ) ) ;
264+ assert ! ( ( * ( * static_foo_3. with( Value :: clone ) . borrow ( ) ) . fn2. borrow( ) ) . is_null( ) ) ;
265+ assert ! ( ( ( * ( * static_foo_3. with( Value :: clone ) . borrow ( ) ) . n. borrow( ) ) == 42 ) ) ;
266266 let i: Value < i32 > = Rc :: new ( RefCell :: new ( 0 ) ) ;
267267 ' loop_: while ( ( * i. borrow ( ) ) < 2 ) {
268268 assert ! (
269- ( * static_foo_array_4. with( |rc| rc . borrow ( ) . clone ( ) ) [ ( * i. borrow( ) ) as usize ]
269+ ( * ( * static_foo_array_4. with( Value :: clone ) . borrow ( ) ) [ ( * i. borrow( ) ) as usize ]
270270 . s2
271271 . borrow( ) )
272272 . is_null( )
273273 ) ;
274274 assert ! (
275- ( * static_foo_array_4. with( |rc| rc . borrow ( ) . clone ( ) ) [ ( * i. borrow( ) ) as usize ]
275+ ( * ( * static_foo_array_4. with( Value :: clone ) . borrow ( ) ) [ ( * i. borrow( ) ) as usize ]
276276 . fn1
277277 . borrow( ) )
278278 . is_null( )
279279 ) ;
280280 assert ! (
281- ( * static_foo_array_4. with( |rc| rc . borrow ( ) . clone ( ) ) [ ( * i. borrow( ) ) as usize ]
281+ ( * ( * static_foo_array_4. with( Value :: clone ) . borrow ( ) ) [ ( * i. borrow( ) ) as usize ]
282282 . fn2
283283 . borrow( ) )
284284 . is_null( )
0 commit comments