use std::io::BufWriter;
use std::path::{Path, PathBuf};
+use rustc_span::*;
use syntax::ast::{self, Attribute, NodeId, PatKind, DUMMY_NODE_ID};
use syntax::print::pprust;
use syntax::print::pprust::{param_to_string, ty_to_string};
use syntax::source_map::Spanned;
use syntax::util::comments::strip_doc_comment_decoration;
use syntax::visit::{self, Visitor};
-use syntax_pos::*;
use dump_visitor::DumpVisitor;
use span_utils::SpanUtils;
let mut result = String::new();
for attr in attrs {
- if attr.check_name(sym::doc) {
- if let Some(val) = attr.value_str() {
- if attr.is_doc_comment() {
- result.push_str(&strip_doc_comment_decoration(&val.as_str()));
- } else {
- result.push_str(&val.as_str());
- }
- result.push('\n');
- } else if let Some(meta_list) = attr.meta_item_list() {
+ if let Some(val) = attr.doc_str() {
+ if attr.is_doc_comment() {
+ result.push_str(&strip_doc_comment_decoration(&val.as_str()));
+ } else {
+ result.push_str(&val.as_str());
+ }
+ result.push('\n');
+ } else if attr.check_name(sym::doc) {
+ if let Some(meta_list) = attr.meta_item_list() {
meta_list
.into_iter()
.filter(|it| it.check_name(sym::include))