Skip to content

Commit 88fa621

Browse files
Add documentation for Attr::is_doc_comment
1 parent e7c7aa7 commit 88fa621

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)