mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Auto merge of #8449 - jyn514:rustdoc, r=ehuss
Don't overwrite existing `rustdoc` args with --document-private-items Instead, add that flag in addition to any existing flags. Closes https://github.com/rust-lang/cargo/issues/8445
This commit is contained in:
commit
c95c0b1c53
@ -476,7 +476,10 @@ pub fn create_bcx<'a, 'cfg>(
|
||||
}
|
||||
|
||||
if let Some(args) = extra_args {
|
||||
extra_compiler_args.insert(unit.clone(), args.clone());
|
||||
extra_compiler_args
|
||||
.entry(unit.clone())
|
||||
.or_default()
|
||||
.extend(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,17 @@ fn rustdoc_args() {
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn rustdoc_binary_args_passed() {
|
||||
let p = project().file("src/main.rs", "").build();
|
||||
|
||||
p.cargo("rustdoc -v")
|
||||
.arg("--")
|
||||
.arg("--markdown-no-toc")
|
||||
.with_stderr_contains("[RUNNING] `rustdoc [..] --markdown-no-toc[..]`")
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn rustdoc_foo_with_bar_dependency() {
|
||||
let foo = project()
|
||||
|
Loading…
x
Reference in New Issue
Block a user