Skip to content

Commit 41e1830

Browse files
authored
Rollup merge of #101536 - GuillaumeGomez:is_doc_comment-doc, r=lqd
Add documentation for Attr::is_doc_comment The function name is very misleading, some explanations won't hurt. r? `@lqd`
2 parents 497e170 + 88fa621 commit 41e1830

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_ast/src/attr

1 file changed

+2
-0
lines changed

compiler/rustc_ast/src/attr/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ impl AttrItem {
232232
}
233233

234234
impl Attribute {
235+
/// Returns `true` if it is a sugared doc comment (`///` or `//!` for example).
236+
/// So `#[doc = "doc"]` will return `false`.
235237
pub fn is_doc_comment(&self) -> bool {
236238
match self.kind {
237239
AttrKind::Normal(..) => false,

0 commit comments

Comments
 (0)