v2 / vlib / v / parser / tests / ref_array_pos_err.out
8 lines · 8 sloc · 391 bytes · 1ac3f3d8dc65546073ce0a071f6c968d8ff5a650
Raw
1vlib/v/parser/tests/ref_array_pos_err.vv:2:5: error: V arrays are already references behind the scenes,
2there is no need to use a reference to an array (e.g. use `[]string` instead of `&[]string`).
3If you need to modify an array in a function, use a mutable argument instead: `fn foo(mut s []string) {}`.
4 1 | struct Foo {
5 2 | b &[]u8
6 | ^
7 3 | n int
8 4 | }
9