Skip to content

Commit

Permalink
save-analysis: strip /// or whatever from doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Sep 7, 2016
1 parent 493544a commit b58294e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustc_save_analysis/lib.rs
Expand Up @@ -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};
Expand Down Expand Up @@ -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');
}
}
Expand Down

0 comments on commit b58294e

Please sign in to comment.