Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/librustdoc/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,12 @@ fn parse_extern_html_roots(
// FIXME(eddyb) This shouldn't be duplicated with `rustc::session`.
fn parse_externs(matches: &getopts::Matches) -> Result<Externs, String> {
let mut externs: BTreeMap<_, ExternEntry> = BTreeMap::new();
for arg in matches.opt_strs("extern").iter().chain(matches.opt_strs("extern-private").iter()) {
let extern_private = if nightly_options::is_nightly_build() {
matches.opt_strs("extern-private")
} else {
Vec::new()
};
for arg in matches.opt_strs("extern").iter().chain(extern_private.iter()) {
let mut parts = arg.splitn(2, '=');
let name = parts.next().ok_or("--extern value must not be empty".to_string())?;
let location = parts.next().map(|s| s.to_string());
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ fn opts() -> Vec<RustcOptGroup> {
stable("extern", |o| {
o.optmulti("", "extern", "pass an --extern to rustc", "NAME[=PATH]")
}),
stable("extern-private", |o| {
unstable("extern-private", |o| {
o.optmulti("", "extern-private",
"pass an --extern to rustc (compatibility only)", "NAME=PATH")
}),
Expand Down
1 change: 1 addition & 0 deletions src/test/rustdoc/issue-66159.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// aux-build:issue-66159-1.rs
// compile-flags:-Z unstable-options
// extern-private:issue_66159_1

// The issue was an ICE which meant that we never actually generated the docs
Expand Down