Minor cleanup

This commit is contained in:
Lindsey Kuper 2012-08-09 10:41:00 -07:00
parent 9a77a17e3b
commit e82d2ef763

View file

@ -288,24 +288,24 @@ class CoherenceChecker {
} }
for associated_traits.each |associated_trait| { for associated_traits.each |associated_trait| {
let def = self.crate_context.tcx.def_map.get let trait_did =
(associated_trait.ref_id); self.trait_ref_to_trait_def_id(associated_trait);
debug!{"(checking implementation) adding impl for trait \ debug!{"(checking implementation) adding impl for trait \
'%s', item '%s'", '%s', item '%s'",
ast_map::node_id_to_str(self.crate_context.tcx.items, ast_map::node_id_to_str(self.crate_context.tcx.items,
associated_trait.ref_id), trait_did.node),
*item.ident}; *item.ident};
let implementation = self.create_impl_from_item(item); let implementation = self.create_impl_from_item(item);
self.add_trait_method(def_id_of_def(def), implementation); self.add_trait_method(trait_did, implementation);
} }
// Add the implementation to the mapping from implementation to base // Add the implementation to the mapping from implementation to base
// type def ID, if there is a base type for this implementation. // type def ID, if there is a base type for this implementation.
match get_base_type_def_id(self.inference_context, match get_base_type_def_id(self.inference_context,
item.span, item.span,
self_type.ty) { self_type.ty) {
none => { none => {
// Nothing to do. // Nothing to do.
} }