Skip to content

Commit 4c385c2

Browse files
committed
Merge remote-tracking branch 'upstream/master' into invoke-experiments
2 parents 1d85669 + 66f7026 commit 4c385c2

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

src/builder.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ impl<'ctx> Builder<'ctx> {
110110
/// [`FunctionValue`]s can be implicitly converted into a [`CallableValue`].
111111
/// See [`CallableValue`] for details on calling a [`PointerValue`] that points to a function.
112112
///
113+
/// [`FunctionValue`]: crate::values::FunctionValue
114+
///
113115
/// # Example
114116
///
115117
/// ```no_run

src/values/callable_value.rs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@ use llvm_sys::prelude::LLVMValueRef;
88
use llvm_sys::core::{LLVMGetTypeKind, LLVMGetElementType, LLVMTypeOf, LLVMGetReturnType};
99
use llvm_sys::LLVMTypeKind;
1010

11-
// imports used in documentation
12-
#[allow(unused_imports)]
13-
use crate::builder::Builder;
14-
#[allow(unused_imports)]
15-
use std::convert::TryInto;
16-
17-
/// A value that can be called with the [`Builder::build_call`] instruction.
11+
/// A value that can be called with the [`build_call`] instruction.
1812
///
19-
/// In practice, the `F : Into<CallableValue<'ctx>>` bound of [`Builder::build_call`] means it is
20-
/// possible to pass a [`FunctionValue`] to `build_call` directly. It will be implicitly converted
13+
/// In practice, the `F : Into<CallableValue<'ctx>>` bound of [`build_call`] means it is
14+
/// possible to pass a [`FunctionValue`] to [`build_call`] directly. It will be implicitly converted
2115
/// into a `CallableValue`.
2216
///
17+
/// [`build_call`]: crate::builder::Builder::build_call
18+
///
2319
/// ```no_run
2420
/// use inkwell::context::Context;
2521
///
@@ -44,8 +40,7 @@ use std::convert::TryInto;
4440
/// ```
4541
///
4642
/// A [`PointerValue`] cannot be implicitly converted to a `CallableValue` because the pointer may
47-
/// point to a non-function value. Instead we can use [`TryFrom`] and [`TryInto`] to handle this
48-
/// failure case explicitly.
43+
/// point to a non-function value. Instead we can use [`TryFrom`] to handle this failure case explicitly.
4944
///
5045
/// ```no_run
5146
/// use std::convert::TryFrom;

0 commit comments

Comments
 (0)