| ... | @@ -258,7 +258,7 @@ pub fn main() !void { | ... | @@ -258,7 +258,7 @@ pub fn main() !void { |
| 258 | <p> | 258 | <p> |
| 259 | The code sample begins by adding Zig's Standard Library to the build using the {#link|@import#} builtin function. | 259 | The code sample begins by adding Zig's Standard Library to the build using the {#link|@import#} builtin function. |
| 260 | The {#syntax#}@import("std"){#endsyntax#} function call creates a structure to represent the Standard Library. | 260 | The {#syntax#}@import("std"){#endsyntax#} function call creates a structure to represent the Standard Library. |
| 261 | The code then {#link|declares|Container level Variables#} a | 261 | The code then {#link|declares|Container Level Variables#} a |
| 262 | {#link|constant identifier|Assignment#}, named <code>std</code>, for easy access to | 262 | {#link|constant identifier|Assignment#}, named <code>std</code>, for easy access to |
| 263 | <a href="https://github.com/ziglang/zig/wiki/FAQ#where-is-the-documentation-for-the-zig-standard-library">Zig's standard library</a>. | 263 | <a href="https://github.com/ziglang/zig/wiki/FAQ#where-is-the-documentation-for-the-zig-standard-library">Zig's standard library</a>. |
| 264 | </p> | 264 | </p> |
| ... | @@ -927,8 +927,8 @@ fn foo() i32 { | ... | @@ -927,8 +927,8 @@ fn foo() i32 { |
| 927 | const expect = std.testing.expect; | 927 | const expect = std.testing.expect; |
| 928 | | 928 | |
| 929 | test "static local variable" { | 929 | test "static local variable" { |
| 930 | expect(foo() == 1235); | 930 | try expect(foo() == 1235); |
| 931 | expect(foo() == 1236); | 931 | try expect(foo() == 1236); |
| 932 | } | 932 | } |
| 933 | | 933 | |
| 934 | fn foo() i32 { | 934 | fn foo() i32 { |
| ... | @@ -7570,10 +7570,10 @@ test "main" { | ... | @@ -7570,10 +7570,10 @@ test "main" { |
| 7570 | <code>declaration</code> must be one of two things: | 7570 | <code>declaration</code> must be one of two things: |
| 7571 | </p> | 7571 | </p> |
| 7572 | <ul> | 7572 | <ul> |
| 7573 | <li>An identifier ({#syntax#}x{#endsyntax#}) identifying a {#link|function|Functions#} or | 7573 | <li>An identifier ({#syntax#}x{#endsyntax#}) identifying a {#link|function|Functions#} or a |
| 7574 | {#link|global variable|Global Variables#}.</li> | 7574 | {#link|variable|Container Level Variables#}.</li> |
| 7575 | <li>Field access ({#syntax#}x.y{#endsyntax#}) looking up a {#link|function|Functions#} or | 7575 | <li>Field access ({#syntax#}x.y{#endsyntax#}) looking up a {#link|function|Functions#} or a |
| 7576 | {#link|global variable|Global Variables#}.</li> | 7576 | {#link|variable|Container Level Variables#}.</li> |
| 7577 | </ul> | 7577 | </ul> |
| 7578 | <p> | 7578 | <p> |
| 7579 | This builtin can be called from a {#link|comptime#} block to conditionally export symbols. | 7579 | This builtin can be called from a {#link|comptime#} block to conditionally export symbols. |