vxx2 / vlib / v / checker / tests / slice_clone_in_struct_init_notice.out
15 lines · 15 sloc · 585 bytes · e2e5cf8db56f3562c7baa735061690be936bdf3e
Raw
1vlib/v/checker/tests/slice_clone_in_struct_init_notice.vv:9:7: notice: an implicit clone of the slice was done here
2 7 |
3 8 | _ := AA{
4 9 | a: a[0..5]
5 | ~~~~~~
6 10 | }
7 11 | _ := a[0..5]
8Details: vlib/v/checker/tests/slice_clone_in_struct_init_notice.vv:9:7: details: To silence this notice, use either an explicit `a[..].clone()`,
9or use an explicit `unsafe{ a[..] }`, if you do not want a copy of the slice.
10 7 |
11 8 | _ := AA{
12 9 | a: a[0..5]
13 | ~~~~~~
14 10 | }
15 11 | _ := a[0..5]
16