diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-03-31 00:04:24 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2023-03-31 00:04:24 +0200 |
| commit | f6035fb0fa68de45befc032e35bb68592ce1d029 (patch) | |
| tree | 28a6b35425da16b6e804bca8d1840a69a2d10b4a /compiler/rustc_resolve/src/rustdoc.rs | |
| parent | bcf8a8b58ccdced38a3b7e9d1f3f219df782cf07 (diff) | |
| download | rust-f6035fb0fa68de45befc032e35bb68592ce1d029.tar.gz rust-f6035fb0fa68de45befc032e35bb68592ce1d029.zip | |
Update doc(primitive) in rustc_resolve
Diffstat (limited to 'compiler/rustc_resolve/src/rustdoc.rs')
| -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; } } |
