@@ -730,18 +730,13 @@ fn main_args(
730
730
core:: new_dcx ( options. error_format , None , options. diagnostic_width , & options. unstable_opts ) ;
731
731
732
732
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 ( ) ;
736
737
let edition = options. edition ;
737
738
let config = core:: create_config ( options, & render_options, using_internal_features) ;
738
739
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
-
745
740
// `markdown::render` can invoke `doctest::make_test`, which
746
741
// requires session globals and a thread pool, so we use
747
742
// `run_compiler`.
@@ -752,7 +747,7 @@ fn main_args(
752
747
} ) ,
753
748
) ;
754
749
}
755
- ( false , false ) => { }
750
+ ( false , None ) => { }
756
751
}
757
752
758
753
// need to move these items separately because we lose them by the time the closure is called,
0 commit comments