ty_to_string
};
use syntax::ptr::P;
-use syntax::codemap::{Spanned, DUMMY_SP, respan};
+use syntax::source_map::{Spanned, DUMMY_SP, respan};
use syntax_pos::*;
use {escape, generated_code, lower_attributes, PathCollector, SaveContext};
// of macro use (callsite) spans. We store these to ensure
// we only write one macro def per unique macro definition, and
// one macro use per unique callsite span.
- // mac_defs: HashSet<Span>,
+ // mac_defs: FxHashSet<Span>,
macro_calls: FxHashSet<Span>,
}
dumper,
span: span_utils.clone(),
cur_scope: CRATE_NODE_ID,
- // mac_defs: HashSet::new(),
+ // mac_defs: FxHashSet::default(),
macro_calls: FxHashSet(),
}
}
let qualname = format!("::{}", self.tcx.node_path_str(id));
- let cm = self.tcx.sess.codemap();
+ let cm = self.tcx.sess.source_map();
let filename = cm.span_to_filename(span);
let data_id = ::id_from_node_id(id, &self.save_ctxt);
let children = m.items
fn visit_arm(&mut self, arm: &'l ast::Arm) {
self.process_var_decl_multi(&arm.pats);
- walk_list!(self, visit_expr, &arm.guard);
+ match arm.guard {
+ Some(ast::Guard::If(ref expr)) => self.visit_expr(expr),
+ _ => {}
+ }
self.visit_expr(&arm.body);
}