1 error[E0599]: no method named `closure` found for struct `Obj` in the current scope
2 --> $DIR/issue-2392.rs:36:15
4 LL | struct Obj<F> where F: FnOnce() -> u32 {
5 | ------------- method `closure` not found for this struct
7 LL | o_closure.closure();
8 | ^^^^^^^ field, not a method
10 help: to call the function stored in `closure`, surround the field access with parentheses
12 LL | (o_closure.closure)();
15 error[E0599]: no method named `not_closure` found for struct `Obj` in the current scope
16 --> $DIR/issue-2392.rs:38:15
18 LL | struct Obj<F> where F: FnOnce() -> u32 {
19 | ------------- method `not_closure` not found for this struct
21 LL | o_closure.not_closure();
22 | ^^^^^^^^^^^-- help: remove the arguments
26 error[E0599]: no method named `closure` found for struct `Obj` in the current scope
27 --> $DIR/issue-2392.rs:42:12
29 LL | struct Obj<F> where F: FnOnce() -> u32 {
30 | ------------- method `closure` not found for this struct
32 LL | o_func.closure();
33 | ^^^^^^^ field, not a method
35 help: to call the function stored in `closure`, surround the field access with parentheses
37 LL | (o_func.closure)();
40 error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
41 --> $DIR/issue-2392.rs:45:14
43 LL | struct BoxedObj {
44 | --------------- method `boxed_closure` not found for this struct
46 LL | boxed_fn.boxed_closure();
47 | ^^^^^^^^^^^^^ field, not a method
49 help: to call the function stored in `boxed_closure`, surround the field access with parentheses
51 LL | (boxed_fn.boxed_closure)();
54 error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
55 --> $DIR/issue-2392.rs:48:19
57 LL | struct BoxedObj {
58 | --------------- method `boxed_closure` not found for this struct
60 LL | boxed_closure.boxed_closure();
61 | ^^^^^^^^^^^^^ field, not a method
63 help: to call the function stored in `boxed_closure`, surround the field access with parentheses
65 LL | (boxed_closure.boxed_closure)();
68 error[E0599]: no method named `closure` found for struct `Obj` in the current scope
69 --> $DIR/issue-2392.rs:53:12
71 LL | struct Obj<F> where F: FnOnce() -> u32 {
72 | ------------- method `closure` not found for this struct
74 LL | w.wrap.closure();
75 | ^^^^^^^ field, not a method
77 help: to call the function stored in `closure`, surround the field access with parentheses
79 LL | (w.wrap.closure)();
82 error[E0599]: no method named `not_closure` found for struct `Obj` in the current scope
83 --> $DIR/issue-2392.rs:55:12
85 LL | struct Obj<F> where F: FnOnce() -> u32 {
86 | ------------- method `not_closure` not found for this struct
88 LL | w.wrap.not_closure();
89 | ^^^^^^^^^^^-- help: remove the arguments
93 error[E0599]: no method named `closure` found for struct `Obj` in the current scope
94 --> $DIR/issue-2392.rs:58:24
96 LL | struct Obj<F> where F: FnOnce() -> u32 {
97 | ------------- method `closure` not found for this struct
99 LL | check_expression().closure();
100 | ^^^^^^^ field, not a method
102 help: to call the function stored in `closure`, surround the field access with parentheses
104 LL | (check_expression().closure)();
107 error[E0599]: no method named `f1` found for struct `FuncContainer` in the current scope
108 --> $DIR/issue-2392.rs:64:31
110 LL | struct FuncContainer {
111 | -------------------- method `f1` not found for this struct
113 LL | (*self.container).f1(1);
114 | ^^ field, not a method
116 help: to call the function stored in `f1`, surround the field access with parentheses
118 LL | ((*self.container).f1)(1);
121 error[E0599]: no method named `f2` found for struct `FuncContainer` in the current scope
122 --> $DIR/issue-2392.rs:65:31
124 LL | struct FuncContainer {
125 | -------------------- method `f2` not found for this struct
127 LL | (*self.container).f2(1);
128 | ^^ field, not a method
130 help: to call the function stored in `f2`, surround the field access with parentheses
132 LL | ((*self.container).f2)(1);
135 error[E0599]: no method named `f3` found for struct `FuncContainer` in the current scope
136 --> $DIR/issue-2392.rs:66:31
138 LL | struct FuncContainer {
139 | -------------------- method `f3` not found for this struct
141 LL | (*self.container).f3(1);
142 | ^^ field, not a method
144 help: to call the function stored in `f3`, surround the field access with parentheses
146 LL | ((*self.container).f3)(1);
149 error: aborting due to 11 previous errors
151 For more information about this error, try `rustc --explain E0599`.