From e9a03cccf375f11aa4e0a8a3515e499c88d05cde Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 16 Jul 2018 10:53:15 -0400 Subject: all integer sizes are available as primitives * fix wrong implicit cast for `@IntType` bit_count parameter. * fix incorrect docs for `@IntType` bit_count parameter. closes #1242 closes #745 closes #1240 --- doc/langref.html.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/langref.html.in b/doc/langref.html.in index ea672ccb17..46b325832b 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -2310,11 +2310,11 @@ test "while loop continue expression" { } test "while loop continue expression, more complicated" { - var i1: usize = 1; - var j1: usize = 1; - while (i1 * j1 < 2000) : ({ i1 *= 2; j1 *= 3; }) { - const my_ij1 = i1 * j1; - assert(my_ij1 < 2000); + var i: usize = 1; + var j: usize = 1; + while (i * j < 2000) : ({ i *= 2; j *= 3; }) { + const my_ij = i * j; + assert(my_ij < 2000); } } {#code_end#} @@ -5424,7 +5424,7 @@ fn add(a: i32, b: i32) i32 { return a + b; } {#header_close#} {#header_open|@IntType#} -
@IntType(comptime is_signed: bool, comptime bit_count: u8) type
+
@IntType(comptime is_signed: bool, comptime bit_count: u32) type

This function returns an integer type with the given signness and bit count.

-- cgit v1.2.3