vxx2 / vlib / v / checker / tests / struct_ref_fields_init_0_err.out
14 lines · 14 sloc · 501 bytes · 2b52153c1477bb782645f6c50ce6773db6bb5092
Raw
1vlib/v/checker/tests/struct_ref_fields_init_0_err.vv:6:10: error: assigning `0` to a reference field is only allowed in `unsafe` blocks
2 4 |
3 5 | fn main() {
4 6 | _ = Foo{0}
5 | ^
6 7 | _ = Foo{
7 8 | foo: 0
8vlib/v/checker/tests/struct_ref_fields_init_0_err.vv:8:3: error: assigning `0` to a reference field is only allowed in `unsafe` blocks
9 6 | _ = Foo{0}
10 7 | _ = Foo{
11 8 | foo: 0
12 | ~~~~~~
13 9 | }
14 10 |
15