diff options
| author | bors <bors@rust-lang.org> | 2023-03-31 20:38:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-31 20:38:06 +0000 |
| commit | 5e1d3299a290026b85787bc9c7e72bcc53ac283f (patch) | |
| tree | eeda41ac20955d71475e9772e5ece158203d92f1 /compiler/rustc_resolve | |
| parent | 7402519c6303000d49f67a57c96b6863c88a9163 (diff) | |
| parent | 083c128ae17b505fd86f6a990dc5bd185cfc6c26 (diff) | |
| download | rust-5e1d3299a290026b85787bc9c7e72bcc53ac283f.tar.gz rust-5e1d3299a290026b85787bc9c7e72bcc53ac283f.zip | |
Auto merge of #109824 - GuillaumeGomez:rollup-i5r4uts, r=GuillaumeGomez
Rollup of 7 pull requests Successful merges: - #109104 (rustdoc: Fix invalid suggestions on ambiguous intra doc links v2) - #109443 (Move `doc(primitive)` future incompat warning to `invalid_doc_attributes`) - #109680 (Fix subslice capture in closure) - #109798 (fluent_messages macro: don't emit the OS error in a note) - #109805 (Source map cleanups) - #109818 (rustdoc: Add GUI test for jump to collapsed item) - #109820 (rustdoc-search: update docs for comma in `?` help popover) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_resolve')
| -rw-r--r-- | compiler/rustc_resolve/src/rustdoc.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/rustdoc.rs b/compiler/rustc_resolve/src/rustdoc.rs index 44a27bbc175..9eae99be2e9 100644 --- a/compiler/rustc_resolve/src/rustdoc.rs +++ b/compiler/rustc_resolve/src/rustdoc.rs @@ -339,12 +339,14 @@ pub fn inner_docs(attrs: &[ast::Attribute]) -> bool { attrs.iter().find(|a| a.doc_str().is_some()).map_or(true, |a| a.style == ast::AttrStyle::Inner) } -/// Has `#[doc(primitive)]` or `#[doc(keyword)]`. +/// Has `#[rustc_doc_primitive]` or `#[doc(keyword)]`. pub fn has_primitive_or_keyword_docs(attrs: &[ast::Attribute]) -> bool { for attr in attrs { - if attr.has_name(sym::doc) && let Some(items) = attr.meta_item_list() { + if attr.has_name(sym::rustc_doc_primitive) { + return true; + } else if attr.has_name(sym::doc) && let Some(items) = attr.meta_item_list() { for item in items { - if item.has_name(sym::primitive) || item.has_name(sym::keyword) { + if item.has_name(sym::keyword) { return true; } } |
