Skip to content

Commit 044d15b

Browse files
committed
Erase #![doc(document_private_items)]
1 parent 2371802 commit 044d15b

File tree

6 files changed

+2
-17
lines changed

6 files changed

+2
-17
lines changed

compiler/rustc_passes/messages.ftl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ passes_doc_test_unknown_passes =
226226
unknown `doc` attribute `{$path}`
227227
.note = `doc` attribute `{$path}` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136>
228228
.label = no longer functions
229-
.help = you may want to use `doc(document_private_items)`
230229
.no_op_note = `doc({$path})` is now a no-op
231230
232231
passes_doc_test_unknown_plugins =

compiler/rustc_passes/src/errors.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ pub(crate) struct DocTestUnknownSpotlight {
331331
#[derive(LintDiagnostic)]
332332
#[diag(passes_doc_test_unknown_passes)]
333333
#[note]
334-
#[help]
335334
#[note(passes_no_op_note)]
336335
pub(crate) struct DocTestUnknownPasses {
337336
pub path: String,

compiler/rustc_span/src/symbol.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,6 @@ symbols! {
883883
doc_primitive,
884884
doc_spotlight,
885885
doctest,
886-
document_private_items,
887886
dotdot: "..",
888887
dotdot_in_tuple_patterns,
889888
dotdoteq_in_patterns,

src/librustdoc/core.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -413,14 +413,6 @@ pub(crate) fn run_global_ctxt(
413413
);
414414
}
415415

416-
// Process all of the crate attributes, extracting plugin metadata along
417-
// with the passes which we are supposed to run.
418-
for attr in krate.module.attrs.lists(sym::doc) {
419-
if attr.is_word() && attr.has_name(sym::document_private_items) {
420-
ctxt.render_options.document_private = true;
421-
}
422-
}
423-
424416
info!("Executing passes");
425417

426418
let mut visited = FxHashMap::default();

tests/rustdoc-ui/deprecated-attrs.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
//~^ ERROR unknown `doc` attribute `no_default_passes`
55
//~| NOTE no longer functions
66
//~| NOTE see issue #44136
7-
//~| HELP you may want to use `doc(document_private_items)`
87
//~| NOTE `doc(no_default_passes)` is now a no-op
98
//~| NOTE `#[deny(invalid_doc_attributes)]` on by default
109
#![doc(passes = "collapse-docs unindent-comments")]
1110
//~^ ERROR unknown `doc` attribute `passes`
1211
//~| NOTE no longer functions
1312
//~| NOTE see issue #44136
14-
//~| HELP you may want to use `doc(document_private_items)`
1513
//~| NOTE `doc(passes)` is now a no-op
1614
#![doc(plugins = "xxx")]
1715
//~^ ERROR unknown `doc` attribute `plugins`

tests/rustdoc-ui/deprecated-attrs.stderr

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,20 @@ LL | #![doc(no_default_passes)]
1010
| ^^^^^^^^^^^^^^^^^ no longer functions
1111
|
1212
= note: `doc` attribute `no_default_passes` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136>
13-
= help: you may want to use `doc(document_private_items)`
1413
= note: `doc(no_default_passes)` is now a no-op
1514
= note: `#[deny(invalid_doc_attributes)]` on by default
1615

1716
error: unknown `doc` attribute `passes`
18-
--> $DIR/deprecated-attrs.rs:10:8
17+
--> $DIR/deprecated-attrs.rs:9:8
1918
|
2019
LL | #![doc(passes = "collapse-docs unindent-comments")]
2120
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no longer functions
2221
|
2322
= note: `doc` attribute `passes` no longer functions; see issue #44136 <https://github.com/rust-lang/rust/issues/44136>
24-
= help: you may want to use `doc(document_private_items)`
2523
= note: `doc(passes)` is now a no-op
2624

2725
error: unknown `doc` attribute `plugins`
28-
--> $DIR/deprecated-attrs.rs:16:8
26+
--> $DIR/deprecated-attrs.rs:14:8
2927
|
3028
LL | #![doc(plugins = "xxx")]
3129
| ^^^^^^^^^^^^^^^ no longer functions

0 commit comments

Comments
 (0)