authorgravatar for 35318078+samrock5000@users.noreply.github.comSamuel Nevarez <35318078+samrock5000@users.noreply.github.com> 2024-01-01 10:05:15-06:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2024-01-02 12:06:59+02:00
log25a556107cbd10cbddf530e633f70c688498d4e3
treedc46eb9fc305c61732ea1c41debd7508e8693c1b
parent2b589783602c5428ecde9dbb3f41a81f85eb0f25

langref: order comment to align with code example


1 files changed, 3 insertions(+), 3 deletions(-)

doc/langref.html.in+3-3
...@@ -3039,10 +3039,10 @@ test "basic slices" {...@@ -3039,10 +3039,10 @@ test "basic slices" {
3039 const array_ptr_len = array[runtime_start..][0..length];3039 const array_ptr_len = array[runtime_start..][0..length];
3040 try expect(@TypeOf(array_ptr_len) == *[length]i32);3040 try expect(@TypeOf(array_ptr_len) == *[length]i32);
30413041
3042 // Using the address-of operator on a slice gives a single-item pointer,3042 // Using the address-of operator on a slice gives a single-item pointer.
3043 // while using the `ptr` field gives a many-item pointer.
3044 try expect(@TypeOf(slice.ptr) == [*]i32);
3045 try expect(@TypeOf(&slice[0]) == *i32);3043 try expect(@TypeOf(&slice[0]) == *i32);
3044 // Using the `ptr` field gives a many-item pointer.
3045 try expect(@TypeOf(slice.ptr) == [*]i32);
3046 try expect(@intFromPtr(slice.ptr) == @intFromPtr(&slice[0]));3046 try expect(@intFromPtr(slice.ptr) == @intFromPtr(&slice[0]));
30473047
3048 // Slices have array bounds checking. If you try to access something out3048 // Slices have array bounds checking. If you try to access something out