Skip to content

Commit 1171163

Browse files
committed
Improve documentation for Builder::build_cmp
1 parent d3c9b57 commit 1171163

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl Builder {
159159
bin_op!{build_ashr, LLVMBuildAShr}
160160
bin_op!{build_and, LLVMBuildAnd}
161161
bin_op!{build_or, LLVMBuildOr}
162-
/// Build an instruction to compare two values with the predicate given.
162+
/// Build an instruction to compare the values `a` and `b` with the predicate / comparative operator `pred`.
163163
pub fn build_cmp(&self, a: &Value, b: &Value, pred: Predicate) -> &Value {
164164
let (at, bt) = (a.get_type(), b.get_type());
165165
assert_eq!(at, bt);
@@ -184,7 +184,7 @@ impl Builder {
184184
};
185185
unsafe { core::LLVMBuildFCmp(self.into(), pred, a.into(), b.into(), NULL_NAME.as_ptr()) }.into()
186186
} else {
187-
panic!("expected numbers, got {:?}", at)
187+
panic!("expected numzextbers, got {:?}", at)
188188
}
189189
}
190190
}

0 commit comments

Comments
 (0)