vxx2 / vlib / v / checker / tests / nocopy_struct_err.out
42 lines · 42 sloc · 1.61 KB · a7fef7c4930a3443b41f2a53c855839df4cccea6
Raw
1vlib/v/checker/tests/nocopy_struct_err.vv:11:19: error: cannot copy @[nocopy] struct: use a reference instead
2 9 |
3 10 | struct Holder {
4 11 | field Resource = base_resource
5 | ~~~~~~~~~~~~~
6 12 | }
7 13 |
8vlib/v/checker/tests/nocopy_struct_err.vv:22:9: error: cannot copy @[nocopy] struct: use a reference instead
9 20 | handle: 2
10 21 | }
11 22 | dup := resource
12 | ~~~~~~~~
13 23 | takes_value(resource)
14 24 | _ = Holder{
15vlib/v/checker/tests/nocopy_struct_err.vv:23:14: error: cannot pass @[nocopy] struct by value: use a reference instead
16 21 | }
17 22 | dup := resource
18 23 | takes_value(resource)
19 | ~~~~~~~~
20 24 | _ = Holder{
21 25 | field: resource
22vlib/v/checker/tests/nocopy_struct_err.vv:25:10: error: cannot copy @[nocopy] struct: use a reference instead
23 23 | takes_value(resource)
24 24 | _ = Holder{
25 25 | field: resource
26 | ~~~~~~~~
27 26 | }
28 27 | _ = fn [resource] () {
29vlib/v/checker/tests/nocopy_struct_err.vv:27:10: error: cannot capture @[nocopy] struct by value: use a reference instead
30 25 | field: resource
31 26 | }
32 27 | _ = fn [resource] () {
33 | ~~~~~~~~
34 28 | _ = resource.handle
35 29 | }
36vlib/v/checker/tests/nocopy_struct_err.vv:30:14: error: cannot capture @[nocopy] struct by value: use a reference instead
37 28 | _ = resource.handle
38 29 | }
39 30 | _ = fn [mut resource] () {
40 | ~~~~~~~~
41 31 | _ = resource.handle
42 32 | }
43