File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/librustc/middle/typeck/check Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -727,6 +727,23 @@ pub fn resolve_impl(ccx: @mut CrateCtxt, impl_item: @ast::item) {
727
727
728
728
// FIXME(#7450): Doesn't work cross crate
729
729
ccx. vtable_map . insert ( impl_item. id , vtbls) ;
730
+
731
+ // Now, locate the vtable for the impl itself. The real
732
+ // purpose of this is to check for supertrait impls,
733
+ // but that falls out of doing this.
734
+ let param_bounds = ty:: ParamBounds {
735
+ builtin_bounds : ty:: EmptyBuiltinBounds ( ) ,
736
+ trait_bounds : ~[ trait_ref]
737
+ } ;
738
+ let t = ty:: node_id_to_type ( ccx. tcx , impl_item. id ) ;
739
+ debug ! ( "=== Doing a self lookup now." ) ;
740
+ // Right now, we don't have any place to store this.
741
+ // We will need to make one so we can use this information
742
+ // for compiling default methods that refer to supertraits.
743
+ let _self_vtable_res =
744
+ lookup_vtables_for_param ( & vcx, & loc_info, None ,
745
+ & param_bounds, t, false ) ;
746
+
730
747
}
731
748
}
732
749
}
You can’t perform that action at this time.
0 commit comments