@@ -145,6 +145,9 @@ pub struct Options {
145145 pub render_options : RenderOptions ,
146146 /// Output format rendering (used only for "show-coverage" option for the moment)
147147 pub output_format : Option < OutputFormat > ,
148+ /// If this option is set to `true`, rustdoc will only run checks and not generate
149+ /// documentation.
150+ pub run_check : bool ,
148151}
149152
150153impl fmt:: Debug for Options {
@@ -185,6 +188,7 @@ impl fmt::Debug for Options {
185188 . field ( "runtool" , & self . runtool )
186189 . field ( "runtool_args" , & self . runtool_args )
187190 . field ( "enable-per-target-ignores" , & self . enable_per_target_ignores )
191+ . field ( "run_check" , & self . run_check )
188192 . finish ( )
189193 }
190194}
@@ -581,6 +585,7 @@ impl Options {
581585 let enable_per_target_ignores = matches. opt_present ( "enable-per-target-ignores" ) ;
582586 let document_private = matches. opt_present ( "document-private-items" ) ;
583587 let document_hidden = matches. opt_present ( "document-hidden-items" ) ;
588+ let run_check = matches. opt_present ( "check" ) ;
584589
585590 let ( lint_opts, describe_lints, lint_cap) = get_cmd_lint_options ( matches, error_format) ;
586591
@@ -616,6 +621,7 @@ impl Options {
616621 runtool_args,
617622 enable_per_target_ignores,
618623 test_builder,
624+ run_check,
619625 render_options : RenderOptions {
620626 output,
621627 external_html,
0 commit comments