aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/for.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2023-11-11 07:27:31 +0000
committermlugg <mlugg@mlugg.co.uk>2023-11-19 09:56:51 +0000
commit21fa187abc2a06c9bd5cfe4355c5edbfb3177f6b (patch)
treeaab7cc16498184bac0fd8b6d5443f7bd606e7bf8 /test/cases/compile_errors/for.zig
parent2c1acb618027939c0812bc87a432b51632127717 (diff)
downloadzig-21fa187abc2a06c9bd5cfe4355c5edbfb3177f6b.tar.gz
zig-21fa187abc2a06c9bd5cfe4355c5edbfb3177f6b.zip
test: update cases to silence 'var is never mutated' errors
Diffstat (limited to 'test/cases/compile_errors/for.zig')
-rw-r--r--test/cases/compile_errors/for.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/cases/compile_errors/for.zig b/test/cases/compile_errors/for.zig
index 568c416062..4c25f9d93f 100644
--- a/test/cases/compile_errors/for.zig
+++ b/test/cases/compile_errors/for.zig
@@ -17,6 +17,7 @@ export fn c() void {
for (buf) |*byte| {
_ = byte;
}
+ _ = &buf;
}
export fn d() void {
const x: [*]const u8 = "hello";
@@ -39,6 +40,6 @@ export fn d() void {
// :10:14: note: for loop operand must be a range, array, slice, tuple, or vector
// :17:16: error: pointer capture of non pointer type '[10]u8'
// :17:10: note: consider using '&' here
-// :24:5: error: unbounded for loop
-// :24:10: note: type '[*]const u8' has no upper bound
-// :24:18: note: type '[*]const u8' has no upper bound
+// :25:5: error: unbounded for loop
+// :25:10: note: type '[*]const u8' has no upper bound
+// :25:18: note: type '[*]const u8' has no upper bound