@@ -503,7 +503,10 @@ automatically infer them to be a target, such as in subfolders.
503503
504504For more information on this warning you can consult
505505https://github.com/rust-lang/cargo/issues/5330
506- error: no example target named `a`
506+ error: no example target named `a`.
507+ Available example targets:
508+ do_magic
509+
507510" ,
508511 )
509512 . run ( ) ;
@@ -528,7 +531,14 @@ fn run_example_autodiscover_2015_with_autoexamples_disabled() {
528531 let p = autodiscover_examples_project ( "2015" , Some ( false ) ) ;
529532 p. cargo ( "run --example a" )
530533 . with_status ( 101 )
531- . with_stderr ( "error: no example target named `a`\n " )
534+ . with_stderr (
535+ "\
536+ error: no example target named `a`.
537+ Available example targets:
538+ do_magic
539+
540+ " ,
541+ )
532542 . run ( ) ;
533543}
534544
@@ -600,7 +610,14 @@ fn run_with_filename() {
600610
601611 p. cargo ( "run --bin bin.rs" )
602612 . with_status ( 101 )
603- . with_stderr ( "[ERROR] no bin target named `bin.rs`" )
613+ . with_stderr (
614+ "\
615+ [ERROR] no bin target named `bin.rs`.
616+ Available bin targets:
617+ a
618+
619+ " ,
620+ )
604621 . run ( ) ;
605622
606623 p. cargo ( "run --bin a.rs" )
@@ -615,7 +632,14 @@ fn run_with_filename() {
615632
616633 p. cargo ( "run --example example.rs" )
617634 . with_status ( 101 )
618- . with_stderr ( "[ERROR] no example target named `example.rs`" )
635+ . with_stderr (
636+ "\
637+ [ERROR] no example target named `example.rs`.
638+ Available example targets:
639+ a
640+
641+ " ,
642+ )
619643 . run ( ) ;
620644
621645 p. cargo ( "run --example a.rs" )
0 commit comments