diff --git a/doc/langref.html.in b/doc/langref.html.in index 1625e7f800..868de8f1aa 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -2691,7 +2691,8 @@ const expect = @import("std").testing.expect; test "pointer slicing" { var array = [_]u8{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; - const slice = array[2..4]; + var start: usize = 2; + const slice = array[start..4]; try expect(slice.len == 2); try expect(array[3] == 4);