Skip to content

Commit 27ea27e

Browse files
committed
Fix using using the same vtable twice
1 parent 421fe2e commit 27ea27e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vtable.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@ fn build_vtable<'a, 'tcx: 'a>(
138138
false,
139139
)
140140
.unwrap();
141-
fx.module.define_data(data_id, &data_ctx).unwrap();
141+
142+
match fx.module.define_data(data_id, &data_ctx) {
143+
Ok(()) | Err(cranelift_module::ModuleError::DuplicateDefinition(_)) => {}
144+
err => err.unwrap(),
145+
}
146+
142147
data_id
143148
}
144149

0 commit comments

Comments
 (0)