Skip to content

Commit 9720520

Browse files
committed
Remove unused HasVtable::Extra associated type
This is a throwback from the old, ad-hoc computation before we used the fixpoint analysis.
1 parent 331862a commit 9720520

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

src/ir/analysis/has_vtable.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,6 @@ impl<'ctx, 'gen> From<HasVtableAnalysis<'ctx, 'gen>> for HashSet<ItemId> {
157157
/// looking up the results of the HasVtableAnalysis's computations for a
158158
/// specific thing.
159159
pub trait HasVtable {
160-
161-
/// Implementations can define this type to get access to any extra
162-
/// information required to determine whether they have vtable. If
163-
/// extra information is unneeded, then this should simply be the unit type.
164-
type Extra;
165-
166160
/// Return `true` if this thing has vtable, `false` otherwise.
167-
fn has_vtable(&self, ctx: &BindgenContext, extra: &Self::Extra) -> bool;
161+
fn has_vtable(&self, ctx: &BindgenContext) -> bool;
168162
}

src/ir/item.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -949,17 +949,13 @@ impl IsOpaque for Item {
949949
}
950950

951951
impl HasVtable for ItemId {
952-
type Extra = ();
953-
954-
fn has_vtable(&self, ctx: &BindgenContext, _: &()) -> bool {
952+
fn has_vtable(&self, ctx: &BindgenContext) -> bool {
955953
ctx.lookup_item_id_has_vtable(self)
956954
}
957955
}
958956

959957
impl HasVtable for Item {
960-
type Extra = ();
961-
962-
fn has_vtable(&self, ctx: &BindgenContext, _: &()) -> bool {
958+
fn has_vtable(&self, ctx: &BindgenContext) -> bool {
963959
ctx.lookup_item_id_has_vtable(&self.id())
964960
}
965961
}

0 commit comments

Comments
 (0)