variable initializations are now mandatory

use `undefined` if you want uninitialized memory
This commit is contained in:
Andrew Kelley
2016-01-25 23:56:46 -07:00
parent b215a3e0b6
commit 4e43973413
8 changed files with 29 additions and 32 deletions

View File

@@ -209,7 +209,7 @@ fn buf_print_i64(out_buf: []u8, x: i64) -> isize {
}
fn buf_print_u64(out_buf: []u8, x: u64) -> isize {
var buf: [max_u64_base10_digits]u8;
var buf: [max_u64_base10_digits]u8 = undefined;
var a = x;
var index = buf.len;