diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-08-22 14:32:31 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-22 14:32:31 +0300 |
| commit | 8667d6d61e8217159377c0e22bc35075848d1202 (patch) | |
| tree | 4dd89f89f346d2a1f435efff54cd27d33485f2c5 /doc/langref.html.in | |
| parent | f1999712b0a8560bd84726c8a5e8fd37dbdf5375 (diff) | |
| parent | 5404dcdfd844e4b9f47dc49a1f43f0e1075a563f (diff) | |
| download | zig-8667d6d61e8217159377c0e22bc35075848d1202.tar.gz zig-8667d6d61e8217159377c0e22bc35075848d1202.zip | |
Merge pull request #12563 from Vexu/stage2-fixes
Stage2 fixes
Diffstat (limited to 'doc/langref.html.in')
| -rw-r--r-- | doc/langref.html.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in index 98db21eebf..0c8f9b0861 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -5024,8 +5024,8 @@ fn shiftLeftOne(a: u32) callconv(.Inline) u32 { // Another file can use @import and call sub2 pub fn sub2(a: i8, b: i8) i8 { return a - b; } -// Functions can be used as values and are equivalent to pointers. -const call2_op = fn (a: i8, b: i8) i8; +// Function pointers are prefixed with `*const `. +const call2_op = *const fn (a: i8, b: i8) i8; fn do_op(fn_call: call2_op, op1: i8, op2: i8) i8 { return fn_call(op1, op2); } |
