We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 493544a commit b58294eCopy full SHA for b58294e
src/librustc_save_analysis/lib.rs
@@ -52,6 +52,7 @@ use std::fs::{self, File};
52
use std::path::{Path, PathBuf};
53
54
use syntax::ast::{self, NodeId, PatKind, Attribute};
55
+use syntax::parse::lexer::comments::strip_doc_comment_decoration;
56
use syntax::parse::token::{self, keywords, InternedString};
57
use syntax::visit::{self, Visitor};
58
use syntax::print::pprust::{ty_to_string, arg_to_string};
@@ -756,7 +757,7 @@ fn docs_for_attrs(attrs: &[Attribute]) -> String {
756
757
for attr in attrs {
758
if attr.name() == doc {
759
if let Some(ref val) = attr.value_str() {
- result.push_str(val);
760
+ result.push_str(&strip_doc_comment_decoration(val));
761
result.push('\n');
762
}
763
0 commit comments