Skip to content

Commit b3a33ae

Browse files
Un-stabilize --extern-private option in rustdoc
1 parent f1b882b commit b3a33ae

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/librustdoc/config.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,12 @@ fn parse_extern_html_roots(
626626
// FIXME(eddyb) This shouldn't be duplicated with `rustc::session`.
627627
fn parse_externs(matches: &getopts::Matches) -> Result<Externs, String> {
628628
let mut externs: BTreeMap<_, ExternEntry> = BTreeMap::new();
629-
for arg in matches.opt_strs("extern").iter().chain(matches.opt_strs("extern-private").iter()) {
629+
let extern_private = if nightly_options::is_nightly_build() {
630+
matches.opt_strs("extern-private")
631+
} else {
632+
Vec::new()
633+
};
634+
for arg in matches.opt_strs("extern").iter().chain(extern_private.iter()) {
630635
let mut parts = arg.splitn(2, '=');
631636
let name = parts.next().ok_or("--extern value must not be empty".to_string())?;
632637
let location = parts.next().map(|s| s.to_string());

src/librustdoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ fn opts() -> Vec<RustcOptGroup> {
144144
stable("extern", |o| {
145145
o.optmulti("", "extern", "pass an --extern to rustc", "NAME[=PATH]")
146146
}),
147-
stable("extern-private", |o| {
147+
unstable("extern-private", |o| {
148148
o.optmulti("", "extern-private",
149149
"pass an --extern to rustc (compatibility only)", "NAME=PATH")
150150
}),

src/test/rustdoc/issue-66159.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// aux-build:issue-66159-1.rs
2+
// compile-flags:-Z unstable-options
23
// extern-private:issue_66159_1
34

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

0 commit comments

Comments
 (0)