Skip to content

Commit c0949e2

Browse files
committed
The IntType should be bound to the lifetime of the Context, not the TargetData.
1 parent fb3c8f3 commit c0949e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/targets.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1316,11 +1316,11 @@ impl TargetData {
13161316
/// let target_data = execution_engine.get_target_data();
13171317
/// let int_type = target_data.ptr_sized_int_type_in_context(&context, None);
13181318
/// ```
1319-
pub fn ptr_sized_int_type_in_context(
1319+
pub fn ptr_sized_int_type_in_context<'ctx>(
13201320
&self,
1321-
context: &Context,
1321+
context: &'ctx Context,
13221322
address_space: Option<AddressSpace>,
1323-
) -> IntType {
1323+
) -> IntType<'ctx> {
13241324
let int_type_ptr = match address_space {
13251325
Some(address_space) => unsafe {
13261326
LLVMIntPtrTypeForASInContext(

0 commit comments

Comments
 (0)