diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-09-07 21:48:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-07 21:48:23 +0200 |
| commit | 41e1830a43bee92bc96d0c2170d94a25f124c98e (patch) | |
| tree | e9db356076c9845802db867920356cdd6857937e | |
| parent | 497e1705038530c322f26573c8d47901d14cd810 (diff) | |
| parent | 88fa621bab003279a0244ef7693eb161a3f755d7 (diff) | |
| download | rust-41e1830a43bee92bc96d0c2170d94a25f124c98e.tar.gz rust-41e1830a43bee92bc96d0c2170d94a25f124c98e.zip | |
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`
| -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, |
