@@ -269,9 +269,9 @@ fn opts() -> Vec<RustcOptGroup> {
269
269
let stable: fn ( _, fn ( & mut getopts:: Options ) -> & mut _ ) -> _ = RustcOptGroup :: stable;
270
270
let unstable: fn ( _, fn ( & mut getopts:: Options ) -> & mut _ ) -> _ = RustcOptGroup :: unstable;
271
271
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" ) ) ,
275
275
stable( "r" , |o| {
276
276
o. optopt( "r" , "input-format" , "the input type of the specified file" , "[rust]" )
277
277
} ) ,
@@ -309,14 +309,14 @@ fn opts() -> Vec<RustcOptGroup> {
309
309
)
310
310
} ) ,
311
311
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" ) ) ,
313
313
stable( "document-private-items" , |o| {
314
- o. optflag ( "" , "document-private-items" , "document private items" )
314
+ o. optflagmulti ( "" , "document-private-items" , "document private items" )
315
315
} ) ,
316
316
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)" )
318
318
} ) ,
319
- stable( "test" , |o| o. optflag ( "" , "test" , "run code examples as tests" ) ) ,
319
+ stable( "test" , |o| o. optflagmulti ( "" , "test" , "run code examples as tests" ) ) ,
320
320
stable( "test-args" , |o| {
321
321
o. optmulti( "" , "test-args" , "arguments to pass to the test runner" , "ARGS" )
322
322
} ) ,
@@ -386,7 +386,7 @@ fn opts() -> Vec<RustcOptGroup> {
386
386
o. optopt( "" , "markdown-playground-url" , "URL to send code snippets to" , "URL" )
387
387
} ) ,
388
388
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" )
390
390
} ) ,
391
391
stable( "e" , |o| {
392
392
o. optopt(
@@ -412,13 +412,13 @@ fn opts() -> Vec<RustcOptGroup> {
412
412
)
413
413
} ) ,
414
414
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" )
416
416
} ) ,
417
417
stable( "crate-version" , |o| {
418
418
o. optopt( "" , "crate-version" , "crate version to print into documentation" , "VERSION" )
419
419
} ) ,
420
420
unstable( "sort-modules-by-appearance" , |o| {
421
- o. optflag (
421
+ o. optflagmulti (
422
422
"" ,
423
423
"sort-modules-by-appearance" ,
424
424
"sort modules by where they appear in the program, rather than alphabetically" ,
@@ -495,7 +495,7 @@ fn opts() -> Vec<RustcOptGroup> {
495
495
o. optopt( "" , "json" , "Configure the structure of JSON diagnostics" , "CONFIG" )
496
496
} ) ,
497
497
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" )
499
499
} ) ,
500
500
stable( "warn" , |o| o. optmulti( "W" , "warn" , "Set lint warnings" , "OPT" ) ) ,
501
501
stable( "allow" , |o| o. optmulti( "A" , "allow" , "Set lint allowed" , "OPT" ) ) ,
@@ -523,7 +523,7 @@ fn opts() -> Vec<RustcOptGroup> {
523
523
o. optopt( "" , "index-page" , "Markdown file to be used as index page" , "PATH" )
524
524
} ) ,
525
525
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" )
527
527
} ) ,
528
528
unstable( "static-root-path" , |o| {
529
529
o. optopt(
@@ -535,7 +535,7 @@ fn opts() -> Vec<RustcOptGroup> {
535
535
)
536
536
} ) ,
537
537
unstable( "disable-per-crate-search" , |o| {
538
- o. optflag (
538
+ o. optflagmulti (
539
539
"" ,
540
540
"disable-per-crate-search" ,
541
541
"disables generating the crate selector on the search box" ,
@@ -550,14 +550,14 @@ fn opts() -> Vec<RustcOptGroup> {
550
550
)
551
551
} ) ,
552
552
unstable( "show-coverage" , |o| {
553
- o. optflag (
553
+ o. optflagmulti (
554
554
"" ,
555
555
"show-coverage" ,
556
556
"calculate percentage of public items with documentation" ,
557
557
)
558
558
} ) ,
559
559
unstable( "enable-per-target-ignores" , |o| {
560
- o. optflag (
560
+ o. optflagmulti (
561
561
"" ,
562
562
"enable-per-target-ignores" ,
563
563
"parse ignore-foo for ignoring doctests on a per-target basis" ,
@@ -582,9 +582,9 @@ fn opts() -> Vec<RustcOptGroup> {
582
582
unstable( "test-builder" , |o| {
583
583
o. optopt( "" , "test-builder" , "The rustc-like binary to use as the test builder" , "PATH" )
584
584
} ) ,
585
- unstable( "check" , |o| o. optflag ( "" , "check" , "Run rustdoc checks" ) ) ,
585
+ unstable( "check" , |o| o. optflagmulti ( "" , "check" , "Run rustdoc checks" ) ) ,
586
586
unstable( "generate-redirect-map" , |o| {
587
- o. optflag (
587
+ o. optflagmulti (
588
588
"" ,
589
589
"generate-redirect-map" ,
590
590
"Generate JSON file at the top level instead of generating HTML redirection files" ,
@@ -598,9 +598,11 @@ fn opts() -> Vec<RustcOptGroup> {
598
598
"[unversioned-shared-resources,toolchain-shared-resources,invocation-specific]" ,
599
599
)
600
600
} ) ,
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
+ } ) ,
602
604
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" )
604
606
} ) ,
605
607
]
606
608
}
0 commit comments