about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-25 10:43:08 +0200
committerGitHub <noreply@github.com>2019-10-25 10:43:08 +0200
commit9e3e3a470e4e04ff72148e94ead8d50272842da1 (patch)
treecff2bf99a88fb5aab464277b864006d15365904d
parent0a5b38f9c3d5beb641b146b2a7c56c8b4257633e (diff)
downloadrust-9e3e3a470e4e04ff72148e94ead8d50272842da1.tar.gz
rust-9e3e3a470e4e04ff72148e94ead8d50272842da1.zip
with_desugared_doc: correctly refer to `attr` instead of `self`
Co-Authored-By: David Wood <Q0KPU0H1YOEPHRY1R2SN5B5RL@david.davidtw.co>
-rw-r--r--src/librustdoc/clean/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index d8216fbf796..a642491b281 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -859,8 +859,8 @@ impl Attributes {
         let mut cfg = Cfg::True;
         let mut doc_line = 0;
 
-        /// Converts `self` to a normal `#[doc="foo"]` comment, if it is a
-        /// comment like `///` or `/** */`. (Returns `self` unchanged for
+        /// Converts `attr` to a normal `#[doc="foo"]` comment, if it is a
+        /// comment like `///` or `/** */`. (Returns `attr` unchanged for
         /// non-sugared doc attributes.)
         pub fn with_desugared_doc<T>(attr: &Attribute, f: impl FnOnce(&Attribute) -> T) -> T {
             if attr.is_sugared_doc {