pub mod external_data;
#[macro_use]
pub mod span_utils;
+mod sig;
use rustc::hir;
use rustc::hir::def::Def;
}
}
ast::ExprKind::MethodCall(..) => {
- let method_call = ty::MethodCall::expr(expr.id);
- let method_id = self.tables.method_map[&method_call].def_id;
+ let method_id = self.tables.type_dependent_defs[&expr.id].def_id();
let (def_id, decl_id) = match self.tcx.associated_item(method_id).container {
ty::ImplContainer(_) => (Some(method_id), None),
ty::TraitContainer(_) => (None, Some(method_id)),
if let ty::TyProjection(proj) = ty.sty {
for item in self.tcx.associated_items(proj.trait_ref.def_id) {
if item.kind == ty::AssociatedKind::Type {
- if item.name == proj.item_name {
+ if item.name == proj.item_name(self.tcx) {
return Def::AssociatedTy(item.def_id);
}
}