Rollup merge of #80924 - teryror:issue-80893-fix, r=jyn514

Fix rustdoc --test-builder argument parsing

My suggested fix to issue #80893. I can actually hook Miri in there now.

I also fixed what I believe to be a typo in the option's help text.
This commit is contained in:
Dylan DPC 2021-01-13 03:20:25 +01:00 committed by GitHub
commit c64d3f0afc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -412,11 +412,7 @@ fn opts() -> Vec<RustcOptGroup> {
)
}),
unstable("test-builder", |o| {
o.optflag(
"",
"test-builder",
"specified the rustc-like binary to use as the test builder",
)
o.optopt("", "test-builder", "The rustc-like binary to use as the test builder", "PATH")
}),
unstable("check", |o| o.optflag("", "check", "Run rustdoc checks")),
]

View File

@ -0,0 +1,6 @@
// compile-flags: --test -Z unstable-options --test-builder true
/// ```no_run
/// This tests that `--test-builder` is accepted as a flag by rustdoc.
/// ```
pub struct Foo;