diff --git a/doc/langref.html.in b/doc/langref.html.in index 2682156f5f..d33b143959 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -158,6 +158,7 @@
@inlineCall guarantees that the call
will be inlined. If the call cannot be inlined, a compile error is emitted.
+ See also:
+@intToPtr(comptime DestType: type, int: usize) -> DestType
@@ -4574,6 +4579,25 @@ mem.set(u8, dest, c);
stores the overflowed bits in result and returns true.
If no overflow or underflow occurs, returns false.
@noInlineCall(function: var, args: ...) -> var
+ + This calls a function, in the same way that invoking an expression with parentheses does: +
+const assert = @import("std").debug.assert;
+test "noinline function call" {
+ assert(@noInlineCall(add, 3, 9) == 12);
+}
+
+fn add(a: i32, b: i32) -> i32 { a + b }
+
+ Unlike a normal function call, however, @noInlineCall guarantees that the call
+ will not be inlined. If the call must be inlined, a compile error is emitted.
+
See also:
+@offsetOf(comptime T: type, comptime field_name: [] const u8) -> (number literal)