@@ -730,18 +730,13 @@ fn main_args(
730730 core:: new_dcx ( options. error_format , None , options. diagnostic_width , & options. unstable_opts ) ;
731731
732732 match ( options. should_test , options. markdown_input ( ) ) {
733- ( true , true ) => return wrap_return ( & diag, markdown:: test ( options) ) ,
734- ( true , false ) => return doctest:: run ( & diag, options) ,
735- ( false , true ) => {
733+ ( true , Some ( _) ) => return wrap_return ( & diag, markdown:: test ( options) ) ,
734+ ( true , None ) => return doctest:: run ( & diag, options) ,
735+ ( false , Some ( input) ) => {
736+ let input = input. to_owned ( ) ;
736737 let edition = options. edition ;
737738 let config = core:: create_config ( options, & render_options, using_internal_features) ;
738739
739- use rustc_session:: config:: Input ;
740- let input = match & config. input {
741- Input :: File ( path) => path. clone ( ) ,
742- Input :: Str { .. } => unreachable ! ( "only path to markdown are supported" ) ,
743- } ;
744-
745740 // `markdown::render` can invoke `doctest::make_test`, which
746741 // requires session globals and a thread pool, so we use
747742 // `run_compiler`.
@@ -752,7 +747,7 @@ fn main_args(
752747 } ) ,
753748 ) ;
754749 }
755- ( false , false ) => { }
750+ ( false , None ) => { }
756751 }
757752
758753 // need to move these items separately because we lose them by the time the closure is called,
0 commit comments