Skip to content

Commit 777ef66

Browse files
authored
Merge pull request rust-lang#176 from wasmerio/ptr_sized_int_type_lifetime
Make `target_data.ptr_sized_int_type_in_context` return an IntType with lifetime from the context.
2 parents fb3c8f3 + c0949e2 commit 777ef66

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)