diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2022-09-07 15:34:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-07 15:34:16 +0200 |
| commit | 88fa621bab003279a0244ef7693eb161a3f755d7 (patch) | |
| tree | 13e51a2007505f4a656355b8cab2098c71c91bf1 | |
| parent | e7c7aa7288559f8e5ea7ce3543ff946b09783628 (diff) | |
| download | rust-88fa621bab003279a0244ef7693eb161a3f755d7.tar.gz rust-88fa621bab003279a0244ef7693eb161a3f755d7.zip | |
Add documentation for Attr::is_doc_comment
| -rw-r--r-- | compiler/rustc_ast/src/attr/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_ast/src/attr/mod.rs b/compiler/rustc_ast/src/attr/mod.rs index 5b72ec2b601..6b0dac7c2f0 100644 --- a/compiler/rustc_ast/src/attr/mod.rs +++ b/compiler/rustc_ast/src/attr/mod.rs @@ -232,6 +232,8 @@ impl AttrItem { } impl Attribute { + /// Returns `true` if it is a sugared doc comment (`///` or `//!` for example). + /// So `#[doc = "doc"]` will return `false`. pub fn is_doc_comment(&self) -> bool { match self.kind { AttrKind::Normal(..) => false, |
