You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/builder.rs
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ use llvm_sys::{LLVMOpcode, LLVMIntPredicate, LLVMTypeKind, LLVMRealPredicate, LL
5
5
6
6
use basic_block::BasicBlock;
7
7
use values::{AggregateValue,AsValueRef,BasicValue,BasicValueEnum,PhiValue,FunctionValue,FloatValue,IntValue,PointerValue,VectorValue,InstructionValue};
8
-
use types::{AsTypeRef,AnyType,BasicType,PointerType,IntType,FloatType};
8
+
use types::{AsTypeRef,BasicType,PointerType,IntType,FloatType};
9
9
10
10
use std::ffi::CString;
11
11
@@ -505,23 +505,23 @@ impl Builder {
505
505
/// # Example
506
506
/// A logical left shift is an operation in which an integer value's bits are shifted left by N number of positions.
507
507
///
508
-
/// ```rust
508
+
/// ```rust,no_run
509
509
/// assert_eq!(0b0000_0001 << 0, 0b0000_0001);
510
510
/// assert_eq!(0b0000_0001 << 1, 0b0000_0010);
511
511
/// assert_eq!(0b0000_0011 << 2, 0b0000_1100);
512
512
/// ```
513
513
///
514
514
/// In Rust, a function that could do this for 8bit values looks like:
515
515
///
516
-
/// ```rust
516
+
/// ```rust,no_run
517
517
/// fn left_shift(value: u8, n: u8) -> u8 {
518
518
/// value << n
519
519
/// }
520
520
/// ```
521
521
///
522
522
/// And in Inkwell, the corresponding function would look roughly like:
523
523
///
524
-
/// ```rust
524
+
/// ```rust,no_run
525
525
/// use inkwell::context::Context;
526
526
///
527
527
/// // Setup
@@ -560,7 +560,7 @@ impl Builder {
560
560
/// It may either be logical and have its leftmost N bit(s) filled with zeros or sign extended and filled with ones
561
561
/// if the leftmost bit was one.
562
562
///
563
-
/// ```rust
563
+
/// ```rust,no_run
564
564
/// // Logical Right Shift
565
565
/// assert_eq!(0b1100_0000 >> 2, 0b0011_0000);
566
566
/// assert_eq!(0b0000_0010 >> 1, 0b0000_0001);
@@ -574,7 +574,7 @@ impl Builder {
574
574
///
575
575
/// In Rust, functions that could do this for 8bit values look like:
0 commit comments