@@ -459,7 +459,7 @@ impl<'a> UnitGenerator<'a, '_> {
459459 . map ( |u| & u. pkg )
460460 . collect :: < HashSet < _ > > ( ) ;
461461
462- let skipped_examples: RefCell < Vec < Target > > = RefCell :: new ( Vec :: new ( ) ) ;
462+ let skipped_examples = RefCell :: new ( Vec :: new ( ) ) ;
463463 let can_scrape = |target : & Target | {
464464 match ( target. doc_scrape_examples ( ) , target. is_example ( ) ) {
465465 // Targets configured by the user to not be scraped should never be scraped
@@ -470,7 +470,9 @@ impl<'a> UnitGenerator<'a, '_> {
470470 // it's guaranteed not to break the build
471471 ( RustdocScrapeExamples :: Unset , true ) => {
472472 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 ( ) ) ;
474476 }
475477 safe_to_scrape_example_targets
476478 }
@@ -485,11 +487,7 @@ impl<'a> UnitGenerator<'a, '_> {
485487 let skipped_examples = skipped_examples. into_inner ( ) ;
486488 if !skipped_examples. is_empty ( ) {
487489 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 ( ", " ) ;
493491 shell. warn ( format ! (
494492 "\
495493 Rustdoc did not scrape the following examples because they require dev-dependencies: {example_str}
0 commit comments