Skip to content

Commit 6236fa0

Browse files
committed
---
yaml --- r: 64670 b: refs/heads/snap-stage3 c: 304a5f0 h: refs/heads/master v: v3
1 parent d0ea366 commit 6236fa0

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a0f8540c9571dadb9af542799156cc8a96263c41
4+
refs/heads/snap-stage3: 304a5f07867cff4cb6a558d320efafd7c6da56c3
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/typeck/check/vtable.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,23 @@ pub fn resolve_impl(ccx: @mut CrateCtxt, impl_item: @ast::item) {
727727

728728
// FIXME(#7450): Doesn't work cross crate
729729
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+
730747
}
731748
}
732749
}

0 commit comments

Comments
 (0)