-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
While digging around in librustdoc, i found this little nugget:
Lines 593 to 610 in 16362c7
| for attr in krate.module.as_ref().unwrap().attrs.lists("doc") { | |
| let name = attr.name().map(|s| s.as_str()); | |
| let name = name.as_ref().map(|s| &s[..]); | |
| if attr.is_word() { | |
| if name == Some("no_default_passes") { | |
| default_passes = false; | |
| } | |
| } else if let Some(value) = attr.value_str() { | |
| let sink = match name { | |
| Some("passes") => &mut passes, | |
| Some("plugins") => &mut plugins, | |
| _ => continue, | |
| }; | |
| for p in value.as_str().split_whitespace() { | |
| sink.push(p.to_string()); | |
| } | |
| } | |
| } |
What this does is handle the #![doc(no_default_passes)], #![doc(passes "...")], and #![doc(plugins = "...")] attributes the same way as the --no-defaults, --passes, and --plugins CLI flags. It would be useful to provide an analogue to --document-private-items and emit deprecation warnings for these attributes, as part of deprecating passes and plugins generally.
steveklabnik and euclio
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.