@@ -346,26 +346,18 @@ pub fn item_to_string(i: &ast::Item) -> String {
346
346
to_string ( |s| s. print_item ( i) )
347
347
}
348
348
349
- pub fn impl_item_to_string ( i : & ast:: ImplItem ) -> String {
349
+ fn impl_item_to_string ( i : & ast:: ImplItem ) -> String {
350
350
to_string ( |s| s. print_impl_item ( i) )
351
351
}
352
352
353
- pub fn trait_item_to_string ( i : & ast:: TraitItem ) -> String {
353
+ fn trait_item_to_string ( i : & ast:: TraitItem ) -> String {
354
354
to_string ( |s| s. print_trait_item ( i) )
355
355
}
356
356
357
357
pub fn generic_params_to_string ( generic_params : & [ ast:: GenericParam ] ) -> String {
358
358
to_string ( |s| s. print_generic_params ( generic_params) )
359
359
}
360
360
361
- pub fn where_clause_to_string ( i : & ast:: WhereClause ) -> String {
362
- to_string ( |s| s. print_where_clause ( i) )
363
- }
364
-
365
- pub fn fn_block_to_string ( p : & ast:: FnDecl ) -> String {
366
- to_string ( |s| s. print_fn_block_args ( p) )
367
- }
368
-
369
361
pub fn path_to_string ( p : & ast:: Path ) -> String {
370
362
to_string ( |s| s. print_path ( p, false , 0 ) )
371
363
}
@@ -378,7 +370,8 @@ pub fn vis_to_string(v: &ast::Visibility) -> String {
378
370
to_string ( |s| s. print_visibility ( v) )
379
371
}
380
372
381
- pub fn fun_to_string ( decl : & ast:: FnDecl ,
373
+ #[ cfg( test) ]
374
+ fn fun_to_string ( decl : & ast:: FnDecl ,
382
375
header : ast:: FnHeader ,
383
376
name : ast:: Ident ,
384
377
generics : & ast:: Generics )
@@ -392,7 +385,7 @@ pub fn fun_to_string(decl: &ast::FnDecl,
392
385
} )
393
386
}
394
387
395
- pub fn block_to_string ( blk : & ast:: Block ) -> String {
388
+ fn block_to_string ( blk : & ast:: Block ) -> String {
396
389
to_string ( |s| {
397
390
// containing cbox, will be closed by print-block at }
398
391
s. cbox ( INDENT_UNIT ) ;
@@ -414,23 +407,20 @@ pub fn attribute_to_string(attr: &ast::Attribute) -> String {
414
407
to_string ( |s| s. print_attribute ( attr) )
415
408
}
416
409
417
- pub fn variant_to_string ( var : & ast:: Variant ) -> String {
410
+ #[ cfg( test) ]
411
+ fn variant_to_string ( var : & ast:: Variant ) -> String {
418
412
to_string ( |s| s. print_variant ( var) )
419
413
}
420
414
421
415
pub fn arg_to_string ( arg : & ast:: Arg ) -> String {
422
416
to_string ( |s| s. print_arg ( arg, false ) )
423
417
}
424
418
425
- pub fn mac_to_string ( arg : & ast:: Mac ) -> String {
426
- to_string ( |s| s. print_mac ( arg) )
427
- }
428
-
429
- pub fn foreign_item_to_string ( arg : & ast:: ForeignItem ) -> String {
419
+ fn foreign_item_to_string ( arg : & ast:: ForeignItem ) -> String {
430
420
to_string ( |s| s. print_foreign_item ( arg) )
431
421
}
432
422
433
- pub fn visibility_qualified ( vis : & ast:: Visibility , s : & str ) -> String {
423
+ fn visibility_qualified ( vis : & ast:: Visibility , s : & str ) -> String {
434
424
format ! ( "{}{}" , to_string( |s| s. print_visibility( vis) ) , s)
435
425
}
436
426
0 commit comments