review updateds

This commit is contained in:
achernyak 2017-04-28 16:29:05 -05:00
parent 932d251698
commit 93ac5dff2a
2 changed files with 3 additions and 13 deletions

View File

@ -553,8 +553,8 @@ define_maps! { <'tcx>
pub def_symbol_name: SymbolName(DefId) -> ty::SymbolName,
pub symbol_name: symbol_name_dep_node(ty::Instance<'tcx>) -> ty::SymbolName,
pub describe_def: meta_data_node(DefId) -> Option<Def>,
pub def_span: meta_data_node(DefId) -> Span
pub describe_def: MetaData(DefId) -> Option<Def>,
pub def_span: MetaData(DefId) -> Span
}
fn coherent_trait_dep_node((_, def_id): (CrateNum, DefId)) -> DepNode<DefId> {
@ -585,8 +585,4 @@ fn typeck_item_bodies_dep_node(_: CrateNum) -> DepNode<DefId> {
fn const_eval_dep_node((def_id, _): (DefId, &Substs)) -> DepNode<DefId> {
DepNode::ConstEval(def_id)
}
fn meta_data_node(def_id: DefId) -> DepNode<DefId> {
DepNode::MetaData(def_id)
}

View File

@ -2668,13 +2668,7 @@ fn associated_item_def_ids<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
}
fn def_span<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Span {
match tcx.hir.span_if_local(def_id) {
Some(span) => span,
None => {
let node_id = tcx.sess.cstore.item_body(tcx, def_id).id().node_id;
tcx.hir.span(node_id)
},
}
tcx.hir.span_if_local(def_id).unwrap()
}
pub fn provide(providers: &mut ty::maps::Providers) {