authorgravatar for yetanothercheer@protonmail.comyetanothercheer <yetanothercheer@protonmail.com> 2021-07-08 01:50:57+00:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-07-08 00:05:29-04:00
log7935e83b1d5d29cca058597ebdac6dfd012a790a
treea5f806a9290f65e95ebe2262db8001b16d2af397
parentec63411905ca66dc4dd874b4cde257b0043442e6

Fix indentation in langref.html.in


1 files changed, 15 insertions(+), 15 deletions(-)

doc/langref.html.in+15-15
......@@ -923,21 +923,21 @@ fn foo() i32 {
923923 It is also possible to have local variables with static lifetime by using containers inside functions.
924924 </p>
925925 {#code_begin|test|static_local_variable#}
926 const std = @import("std");
927 const expect = std.testing.expect;
928
929 test "static local variable" {
930 try expect(foo() == 1235);
931 try expect(foo() == 1236);
932 }
933
934 fn foo() i32 {
935 const S = struct {
936 var x: i32 = 1234;
937 };
938 S.x += 1;
939 return S.x;
940 }
926const std = @import("std");
927const expect = std.testing.expect;
928
929test "static local variable" {
930 try expect(foo() == 1235);
931 try expect(foo() == 1236);
932}
933
934fn foo() i32 {
935 const S = struct {
936 var x: i32 = 1234;
937 };
938 S.x += 1;
939 return S.x;
940}
941941 {#code_end#}
942942 <p>
943943 The {#syntax#}extern{#endsyntax#} keyword or {#link|@extern#} builtin function can be used to link against a variable that is exported