Skip to content

Commit e82d2ef

Browse files
committed
Minor cleanup
1 parent 9a77a17 commit e82d2ef

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/rustc/middle/typeck/coherence.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,24 +288,24 @@ class CoherenceChecker {
288288
}
289289

290290
for associated_traits.each |associated_trait| {
291-
let def = self.crate_context.tcx.def_map.get
292-
(associated_trait.ref_id);
291+
let trait_did =
292+
self.trait_ref_to_trait_def_id(associated_trait);
293293
debug!{"(checking implementation) adding impl for trait \
294294
'%s', item '%s'",
295295
ast_map::node_id_to_str(self.crate_context.tcx.items,
296-
associated_trait.ref_id),
296+
trait_did.node),
297297
*item.ident};
298298

299299
let implementation = self.create_impl_from_item(item);
300-
self.add_trait_method(def_id_of_def(def), implementation);
300+
self.add_trait_method(trait_did, implementation);
301301
}
302302

303303
// Add the implementation to the mapping from implementation to base
304304
// type def ID, if there is a base type for this implementation.
305305

306306
match get_base_type_def_id(self.inference_context,
307-
item.span,
308-
self_type.ty) {
307+
item.span,
308+
self_type.ty) {
309309
none => {
310310
// Nothing to do.
311311
}

0 commit comments

Comments
 (0)