@@ -459,7 +459,7 @@ impl<'a> UnitGenerator<'a, '_> {
459
459
. map ( |u| & u. pkg )
460
460
. collect :: < HashSet < _ > > ( ) ;
461
461
462
- let skipped_examples: RefCell < Vec < Target > > = RefCell :: new ( Vec :: new ( ) ) ;
462
+ let skipped_examples = RefCell :: new ( Vec :: new ( ) ) ;
463
463
let can_scrape = |target : & Target | {
464
464
match ( target. doc_scrape_examples ( ) , target. is_example ( ) ) {
465
465
// Targets configured by the user to not be scraped should never be scraped
@@ -470,7 +470,9 @@ impl<'a> UnitGenerator<'a, '_> {
470
470
// it's guaranteed not to break the build
471
471
( RustdocScrapeExamples :: Unset , true ) => {
472
472
if !safe_to_scrape_example_targets {
473
- skipped_examples. borrow_mut ( ) . push ( target. clone ( ) ) ;
473
+ skipped_examples
474
+ . borrow_mut ( )
475
+ . push ( target. name ( ) . to_string ( ) ) ;
474
476
}
475
477
safe_to_scrape_example_targets
476
478
}
@@ -485,11 +487,7 @@ impl<'a> UnitGenerator<'a, '_> {
485
487
let skipped_examples = skipped_examples. into_inner ( ) ;
486
488
if !skipped_examples. is_empty ( ) {
487
489
let mut shell = self . ws . config ( ) . shell ( ) ;
488
- let example_str = skipped_examples
489
- . into_iter ( )
490
- . map ( |t| t. description_named ( ) )
491
- . collect :: < Vec < _ > > ( )
492
- . join ( ", " ) ;
490
+ let example_str = skipped_examples. join ( ", " ) ;
493
491
shell. warn ( format ! (
494
492
"\
495
493
Rustdoc did not scrape the following examples because they require dev-dependencies: {example_str}
0 commit comments