@@ -269,9 +269,9 @@ fn opts() -> Vec<RustcOptGroup> {
269269 let stable: fn ( _, fn ( & mut getopts:: Options ) -> & mut _ ) -> _ = RustcOptGroup :: stable;
270270 let unstable: fn ( _, fn ( & mut getopts:: Options ) -> & mut _ ) -> _ = RustcOptGroup :: unstable;
271271 vec ! [
272- stable( "h" , |o| o. optflag ( "h" , "help" , "show this help message" ) ) ,
273- stable( "V" , |o| o. optflag ( "V" , "version" , "print rustdoc's version" ) ) ,
274- stable( "v" , |o| o. optflag ( "v" , "verbose" , "use verbose output" ) ) ,
272+ stable( "h" , |o| o. optflagmulti ( "h" , "help" , "show this help message" ) ) ,
273+ stable( "V" , |o| o. optflagmulti ( "V" , "version" , "print rustdoc's version" ) ) ,
274+ stable( "v" , |o| o. optflagmulti ( "v" , "verbose" , "use verbose output" ) ) ,
275275 stable( "r" , |o| {
276276 o. optopt( "r" , "input-format" , "the input type of the specified file" , "[rust]" )
277277 } ) ,
@@ -309,14 +309,14 @@ fn opts() -> Vec<RustcOptGroup> {
309309 )
310310 } ) ,
311311 stable( "plugins" , |o| o. optmulti( "" , "plugins" , "removed" , "PLUGINS" ) ) ,
312- stable( "no-default" , |o| o. optflag ( "" , "no-defaults" , "don't run the default passes" ) ) ,
312+ stable( "no-default" , |o| o. optflagmulti ( "" , "no-defaults" , "don't run the default passes" ) ) ,
313313 stable( "document-private-items" , |o| {
314- o. optflag ( "" , "document-private-items" , "document private items" )
314+ o. optflagmulti ( "" , "document-private-items" , "document private items" )
315315 } ) ,
316316 unstable( "document-hidden-items" , |o| {
317- o. optflag ( "" , "document-hidden-items" , "document items that have doc(hidden)" )
317+ o. optflagmulti ( "" , "document-hidden-items" , "document items that have doc(hidden)" )
318318 } ) ,
319- stable( "test" , |o| o. optflag ( "" , "test" , "run code examples as tests" ) ) ,
319+ stable( "test" , |o| o. optflagmulti ( "" , "test" , "run code examples as tests" ) ) ,
320320 stable( "test-args" , |o| {
321321 o. optmulti( "" , "test-args" , "arguments to pass to the test runner" , "ARGS" )
322322 } ) ,
@@ -386,7 +386,7 @@ fn opts() -> Vec<RustcOptGroup> {
386386 o. optopt( "" , "markdown-playground-url" , "URL to send code snippets to" , "URL" )
387387 } ) ,
388388 stable( "markdown-no-toc" , |o| {
389- o. optflag ( "" , "markdown-no-toc" , "don't include table of contents" )
389+ o. optflagmulti ( "" , "markdown-no-toc" , "don't include table of contents" )
390390 } ) ,
391391 stable( "e" , |o| {
392392 o. optopt(
@@ -412,13 +412,13 @@ fn opts() -> Vec<RustcOptGroup> {
412412 )
413413 } ) ,
414414 unstable( "display-warnings" , |o| {
415- o. optflag ( "" , "display-warnings" , "to print code warnings when testing doc" )
415+ o. optflagmulti ( "" , "display-warnings" , "to print code warnings when testing doc" )
416416 } ) ,
417417 stable( "crate-version" , |o| {
418418 o. optopt( "" , "crate-version" , "crate version to print into documentation" , "VERSION" )
419419 } ) ,
420420 unstable( "sort-modules-by-appearance" , |o| {
421- o. optflag (
421+ o. optflagmulti (
422422 "" ,
423423 "sort-modules-by-appearance" ,
424424 "sort modules by where they appear in the program, rather than alphabetically" ,
@@ -495,7 +495,7 @@ fn opts() -> Vec<RustcOptGroup> {
495495 o. optopt( "" , "json" , "Configure the structure of JSON diagnostics" , "CONFIG" )
496496 } ) ,
497497 unstable( "disable-minification" , |o| {
498- o. optflag ( "" , "disable-minification" , "Disable minification applied on JS files" )
498+ o. optflagmulti ( "" , "disable-minification" , "Disable minification applied on JS files" )
499499 } ) ,
500500 stable( "warn" , |o| o. optmulti( "W" , "warn" , "Set lint warnings" , "OPT" ) ) ,
501501 stable( "allow" , |o| o. optmulti( "A" , "allow" , "Set lint allowed" , "OPT" ) ) ,
@@ -523,7 +523,7 @@ fn opts() -> Vec<RustcOptGroup> {
523523 o. optopt( "" , "index-page" , "Markdown file to be used as index page" , "PATH" )
524524 } ) ,
525525 unstable( "enable-index-page" , |o| {
526- o. optflag ( "" , "enable-index-page" , "To enable generation of the index page" )
526+ o. optflagmulti ( "" , "enable-index-page" , "To enable generation of the index page" )
527527 } ) ,
528528 unstable( "static-root-path" , |o| {
529529 o. optopt(
@@ -535,7 +535,7 @@ fn opts() -> Vec<RustcOptGroup> {
535535 )
536536 } ) ,
537537 unstable( "disable-per-crate-search" , |o| {
538- o. optflag (
538+ o. optflagmulti (
539539 "" ,
540540 "disable-per-crate-search" ,
541541 "disables generating the crate selector on the search box" ,
@@ -550,14 +550,14 @@ fn opts() -> Vec<RustcOptGroup> {
550550 )
551551 } ) ,
552552 unstable( "show-coverage" , |o| {
553- o. optflag (
553+ o. optflagmulti (
554554 "" ,
555555 "show-coverage" ,
556556 "calculate percentage of public items with documentation" ,
557557 )
558558 } ) ,
559559 unstable( "enable-per-target-ignores" , |o| {
560- o. optflag (
560+ o. optflagmulti (
561561 "" ,
562562 "enable-per-target-ignores" ,
563563 "parse ignore-foo for ignoring doctests on a per-target basis" ,
@@ -582,9 +582,9 @@ fn opts() -> Vec<RustcOptGroup> {
582582 unstable( "test-builder" , |o| {
583583 o. optopt( "" , "test-builder" , "The rustc-like binary to use as the test builder" , "PATH" )
584584 } ) ,
585- unstable( "check" , |o| o. optflag ( "" , "check" , "Run rustdoc checks" ) ) ,
585+ unstable( "check" , |o| o. optflagmulti ( "" , "check" , "Run rustdoc checks" ) ) ,
586586 unstable( "generate-redirect-map" , |o| {
587- o. optflag (
587+ o. optflagmulti (
588588 "" ,
589589 "generate-redirect-map" ,
590590 "Generate JSON file at the top level instead of generating HTML redirection files" ,
@@ -598,9 +598,11 @@ fn opts() -> Vec<RustcOptGroup> {
598598 "[unversioned-shared-resources,toolchain-shared-resources,invocation-specific]" ,
599599 )
600600 } ) ,
601- unstable( "no-run" , |o| o. optflag( "" , "no-run" , "Compile doctests without running them" ) ) ,
601+ unstable( "no-run" , |o| {
602+ o. optflagmulti( "" , "no-run" , "Compile doctests without running them" )
603+ } ) ,
602604 unstable( "show-type-layout" , |o| {
603- o. optflag ( "" , "show-type-layout" , "Include the memory layout of types in the docs" )
605+ o. optflagmulti ( "" , "show-type-layout" , "Include the memory layout of types in the docs" )
604606 } ) ,
605607 ]
606608}
0 commit comments