Converted var to const if there is no mutation in var.
This is checked from compiler version 0.12.0-dev.1664
This commit is contained in:
parent
b7015c2d9d
commit
7679f93f68
21 changed files with 46 additions and 46 deletions
|
|
@ -46,7 +46,7 @@ pub fn main() void {
|
|||
var nums = [_:0]u32{ 1, 2, 3, 4, 5, 6 };
|
||||
|
||||
// And here's a zero-terminated many-item pointer:
|
||||
var ptr: [*:0]u32 = &nums;
|
||||
const ptr: [*:0]u32 = &nums;
|
||||
|
||||
// For fun, let's replace the value at position 3 with the
|
||||
// sentinel value 0. This seems kind of naughty.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue