From 407eb6e85950cfb274d6f221d707e243977e1eca Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sun, 30 Mar 2025 16:20:10 +0300 Subject: [PATCH 1/3] #23314: mentions that `@import` works with ZON now --- doc/langref.html.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index ac8671ebb7a0..14523c14bb77 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -2289,7 +2289,7 @@ or {#code|test_aligned_struct_fields.zig#}

- Equating packed structs results in a comparison of the backing integer, + Equating packed structs results in a comparison of the backing integer, and only works for the `==` and `!=` operators.

{#code|test_packed_struct_equality.zig#} @@ -5010,6 +5010,11 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val This is usually src/main.zig but depends on what file is built. +

+ {#syntax#}@import{#endsyntax#} can also import ZON at compile time. + Example: {#syntax#}const foo: Foo = @import("foo.zon");{#endsyntax#} + Right now a known result type is required, however, this can be changed in the future. +

{#see_also|Compile Variables|@embedFile#} {#header_close#} From fa14ec7b3b43ca7f61ad658f2bf5f8bacd22607a Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 31 Mar 2025 16:32:13 +0300 Subject: [PATCH 2/3] Address review --- doc/langref.html.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index 14523c14bb77..c858f5ce629c 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -5013,7 +5013,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val

{#syntax#}@import{#endsyntax#} can also import ZON at compile time. Example: {#syntax#}const foo: Foo = @import("foo.zon");{#endsyntax#} - Right now a known result type is required, however, this can be changed in the future. + Right now a known result type is required.

{#see_also|Compile Variables|@embedFile#} {#header_close#} From 8805b85098b34e9fcd67edac8bb6ae8d84239e3c Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 5 Apr 2025 10:10:10 +0300 Subject: [PATCH 3/3] Update doc/langref.html.in Co-authored-by: Jora Troosh --- doc/langref.html.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/langref.html.in b/doc/langref.html.in index c858f5ce629c..d651d1d097df 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -5012,8 +5012,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val

{#syntax#}@import{#endsyntax#} can also import ZON at compile time. - Example: {#syntax#}const foo: Foo = @import("foo.zon");{#endsyntax#} - Right now a known result type is required. + Example: {#syntax#}const foo = @import("foo.zon");{#endsyntax#}

{#see_also|Compile Variables|@embedFile#} {#header_close#}