about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-27 17:11:11 +0000
committerbors <bors@rust-lang.org>2014-08-27 17:11:11 +0000
commit3ee047ae1ffab454270bc1859b3beef3556ef8f9 (patch)
tree0119baf6a73c9e0b3c521bd910652512a509e06c /src
parent18d6eefadbe03ca913cd3a049e900024c4c680d6 (diff)
parentef13555ad1df9d296d0316b511c92ddb47af6743 (diff)
downloadrust-3ee047ae1ffab454270bc1859b3beef3556ef8f9.tar.gz
rust-3ee047ae1ffab454270bc1859b3beef3556ef8f9.zip
auto merge of #16766 : kevinmehall/rust/issue-15976, r=alexcrichton
As of 8876ce44, `is_sugared_doc` is encoded in metadata, so there is no
need to assume that all `doc` attributes came from sugared comments.

Fixes #15976
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/clean/inline.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs
index 0e87be1c241..445672fcdc4 100644
--- a/src/librustdoc/clean/inline.rs
+++ b/src/librustdoc/clean/inline.rs
@@ -124,14 +124,7 @@ fn try_inline_def(cx: &core::DocContext,
 pub fn load_attrs(tcx: &ty::ctxt, did: ast::DefId) -> Vec<clean::Attribute> {
     let mut attrs = Vec::new();
     csearch::get_item_attrs(&tcx.sess.cstore, did, |v| {
-        attrs.extend(v.move_iter().map(|mut a| {
-            // FIXME this isn't quite always true, it's just true about 99% of
-            //       the time when dealing with documentation. For example,
-            //       this would treat doc comments of the form `#[doc = "foo"]`
-            //       incorrectly.
-            if a.name().get() == "doc" && a.value_str().is_some() {
-                a.node.is_sugared_doc = true;
-            }
+        attrs.extend(v.move_iter().map(|a| {
             a.clean()
         }));
     });