Skip to content

Commit f6035fb

Browse files
Update doc(primitive) in rustc_resolve
1 parent bcf8a8b commit f6035fb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

compiler/rustc_resolve/src/rustdoc.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,14 @@ pub fn inner_docs(attrs: &[ast::Attribute]) -> bool {
339339
attrs.iter().find(|a| a.doc_str().is_some()).map_or(true, |a| a.style == ast::AttrStyle::Inner)
340340
}
341341

342-
/// Has `#[doc(primitive)]` or `#[doc(keyword)]`.
342+
/// Has `#[rustc_doc_primitive]` or `#[doc(keyword)]`.
343343
pub fn has_primitive_or_keyword_docs(attrs: &[ast::Attribute]) -> bool {
344344
for attr in attrs {
345-
if attr.has_name(sym::doc) && let Some(items) = attr.meta_item_list() {
345+
if attr.has_name(sym::rustc_doc_primitive) {
346+
return true;
347+
} else if attr.has_name(sym::doc) && let Some(items) = attr.meta_item_list() {
346348
for item in items {
347-
if item.has_name(sym::primitive) || item.has_name(sym::keyword) {
349+
if item.has_name(sym::keyword) {
348350
return true;
349351
}
350352
}

0 commit comments

Comments
 (0)