summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2024-09-02 17:57:42 +0000
committerChris Boesch <chrboesch@noreply.codeberg.org>2024-09-02 17:57:42 +0000
commit2e5b570aef6cae57d00a253da61a62a504146a09 (patch)
treea452bb020c5d66f6ea1452444630789e0e5aa036 /patches
parent296a2b5c6ad3b03dbd237453e7c267d1ca1bab07 (diff)
parentb2f56c7cea6475d5335dd8e8642181817fdc390b (diff)
Merge pull request 'Fixes several changes in std.builtin.zig' (#150) from i149 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/150
Diffstat (limited to 'patches')
-rw-r--r--patches/patches/065_builtins2.patch10
-rw-r--r--patches/patches/071_comptime6.patch6
-rw-r--r--patches/patches/076_sentinels.patch4
-rw-r--r--patches/patches/082_anonymous_structs3.patch6
4 files changed, 13 insertions, 13 deletions
diff --git a/patches/patches/065_builtins2.patch b/patches/patches/065_builtins2.patch
index 4b0ccd2..d5da950 100644
--- a/patches/patches/065_builtins2.patch
+++ b/patches/patches/065_builtins2.patch
@@ -1,5 +1,5 @@
---- exercises/065_builtins2.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/065_builtins2.zig 2023-10-05 20:04:07.136101712 +0200
+--- exercises/065_builtins2.zig 2024-09-02 19:15:56.569952315 +0200
++++ answers/065_builtins2.zig 2024-09-02 19:13:44.280600350 +0200
@@ -58,7 +58,7 @@
// Oops! We cannot leave the 'me' and 'myself' fields
// undefined. Please set them here:
@@ -24,16 +24,16 @@
// (which is a zero-bit type that takes up no space at all!):
- if (fields[0].??? != void) {
+ if (fields[0].type != void) {
- print(" {s}", .{@typeInfo(Narcissus).Struct.fields[0].name});
+ print(" {s}", .{@typeInfo(Narcissus).@"struct".fields[0].name});
}
- if (fields[1].??? != void) {
+ if (fields[1].type != void) {
- print(" {s}", .{@typeInfo(Narcissus).Struct.fields[1].name});
+ print(" {s}", .{@typeInfo(Narcissus).@"struct".fields[1].name});
}
- if (fields[2].??? != void) {
+ if (fields[2].type != void) {
- print(" {s}", .{@typeInfo(Narcissus).Struct.fields[2].name});
+ print(" {s}", .{@typeInfo(Narcissus).@"struct".fields[2].name});
}
diff --git a/patches/patches/071_comptime6.patch b/patches/patches/071_comptime6.patch
index 8731344..98fb6e3 100644
--- a/patches/patches/071_comptime6.patch
+++ b/patches/patches/071_comptime6.patch
@@ -1,8 +1,8 @@
---- exercises/071_comptime6.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/071_comptime6.zig 2023-10-05 20:04:07.162768879 +0200
+--- exercises/071_comptime6.zig 2024-09-02 19:21:50.250454978 +0200
++++ answers/071_comptime6.zig 2024-09-02 19:21:23.553250563 +0200
@@ -40,7 +40,7 @@
- const fields = @typeInfo(Narcissus).Struct.fields;
+ const fields = @typeInfo(Narcissus).@"struct".fields;
- ??? {
+ inline for (fields) |field| {
diff --git a/patches/patches/076_sentinels.patch b/patches/patches/076_sentinels.patch
index cbfae31..7abd01e 100644
--- a/patches/patches/076_sentinels.patch
+++ b/patches/patches/076_sentinels.patch
@@ -1,5 +1,5 @@
---- exercises/076_sentinels.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/076_sentinels.zig 2023-10-05 20:04:07.186102649 +0200
+--- exercises/076_sentinels.zig 2024-09-02 19:27:04.336781039 +0200
++++ answers/076_sentinels.zig 2024-09-02 19:26:15.709134934 +0200
@@ -82,7 +82,7 @@
print("Array:", .{});
diff --git a/patches/patches/082_anonymous_structs3.patch b/patches/patches/082_anonymous_structs3.patch
index 7beb511..193a65a 100644
--- a/patches/patches/082_anonymous_structs3.patch
+++ b/patches/patches/082_anonymous_structs3.patch
@@ -1,11 +1,11 @@
---- exercises/082_anonymous_structs3.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/082_anonymous_structs3.zig 2023-10-05 20:04:07.212769813 +0200
+--- exercises/082_anonymous_structs3.zig 2024-08-04 15:57:16.753494020 +0200
++++ answers/082_anonymous_structs3.zig 2024-09-02 19:30:00.967005314 +0200
@@ -82,14 +82,14 @@
// @typeInfo(Circle).Struct.fields
//
// This will be an array of StructFields.
- const fields = ???;
-+ const fields = @typeInfo(@TypeOf(tuple)).Struct.fields;
++ const fields = @typeInfo(@TypeOf(tuple)).@"struct".fields;
// 2. Loop through each field. This must be done at compile
// time.