@@ -145,6 +145,9 @@ pub struct Options {
145
145
pub render_options : RenderOptions ,
146
146
/// Output format rendering (used only for "show-coverage" option for the moment)
147
147
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 ,
148
151
}
149
152
150
153
impl fmt:: Debug for Options {
@@ -185,6 +188,7 @@ impl fmt::Debug for Options {
185
188
. field ( "runtool" , & self . runtool )
186
189
. field ( "runtool_args" , & self . runtool_args )
187
190
. field ( "enable-per-target-ignores" , & self . enable_per_target_ignores )
191
+ . field ( "run_check" , & self . run_check )
188
192
. finish ( )
189
193
}
190
194
}
@@ -581,6 +585,7 @@ impl Options {
581
585
let enable_per_target_ignores = matches. opt_present ( "enable-per-target-ignores" ) ;
582
586
let document_private = matches. opt_present ( "document-private-items" ) ;
583
587
let document_hidden = matches. opt_present ( "document-hidden-items" ) ;
588
+ let run_check = matches. opt_present ( "check" ) ;
584
589
585
590
let ( lint_opts, describe_lints, lint_cap) = get_cmd_lint_options ( matches, error_format) ;
586
591
@@ -616,6 +621,7 @@ impl Options {
616
621
runtool_args,
617
622
enable_per_target_ignores,
618
623
test_builder,
624
+ run_check,
619
625
render_options : RenderOptions {
620
626
output,
621
627
external_html,
0 commit comments