diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2016-09-07 09:27:56 -0700 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2016-09-07 11:03:57 -0700 |
| commit | b58294e3289cdaca6ef07c77777e4787cad285ad (patch) | |
| tree | 8e5eca1b7c7de6a091f6887d88344863f4ba7747 | |
| parent | 493544a1f9009c794015697440093f59ab1856c7 (diff) | |
| download | rust-b58294e3289cdaca6ef07c77777e4787cad285ad.tar.gz rust-b58294e3289cdaca6ef07c77777e4787cad285ad.zip | |
save-analysis: strip /// or whatever from doc comments
| -rw-r--r-- | src/librustc_save_analysis/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs index 3c0f1075508..6170e14940e 100644 --- a/src/librustc_save_analysis/lib.rs +++ b/src/librustc_save_analysis/lib.rs @@ -52,6 +52,7 @@ use std::fs::{self, File}; use std::path::{Path, PathBuf}; use syntax::ast::{self, NodeId, PatKind, Attribute}; +use syntax::parse::lexer::comments::strip_doc_comment_decoration; use syntax::parse::token::{self, keywords, InternedString}; use syntax::visit::{self, Visitor}; use syntax::print::pprust::{ty_to_string, arg_to_string}; @@ -756,7 +757,7 @@ fn docs_for_attrs(attrs: &[Attribute]) -> String { for attr in attrs { if attr.name() == doc { if let Some(ref val) = attr.value_str() { - result.push_str(val); + result.push_str(&strip_doc_comment_decoration(val)); result.push('\n'); } } |
