This commit is contained in:
mitteneer 2024-07-31 13:32:02 -04:00
parent 28dc209134
commit 723822e800
12 changed files with 23 additions and 23 deletions

View file

@ -35,7 +35,7 @@ pub fn main() void {
// In this contrived example, we've decided to allocate some
// arrays using a variable count! But something's missing...
//
var count = 0;
comptime var count = 0;
count += 1;
const a1: [count]u8 = .{'A'} ** count;
@ -60,5 +60,5 @@ pub fn main() void {
//
// Try uncommenting this line and playing around with it
// (copy it, move it) to see what it does:
//@compileLog("Count at compile time: ", count);
// @compileLog("Count at compile time: ", count);
}