Skip to content

Commit

Permalink
with_desugared_doc: correctly refer to attr instead of self
Browse files Browse the repository at this point in the history
Co-Authored-By: David Wood <[email protected]>
  • Loading branch information
Centril and David Wood authored Oct 25, 2019
1 parent 0a5b38f commit 9e3e3a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9e3e3a4

Please sign in to comment.