1 error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` 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
7 LL | o_closure.closure();
8 | ^^^^^^^ field, not a method
9 help: to call the function stored in `closure`, surround the field access with parentheses
11 LL | (o_closure.closure)();
14 error[E0599]: no method named `not_closure` found for type `Obj<[closure@$DIR/issue-2392.rs:35:36: 35:41]>` in the current scope
15 --> $DIR/issue-2392.rs:38:15
17 LL | struct Obj<F> where F: FnOnce() -> u32 {
18 | -------------------------------------- method `not_closure` not found for this
20 LL | o_closure.not_closure();
21 | ^^^^^^^^^^^-- help: remove the arguments
25 error[E0599]: no method named `closure` found for type `Obj<fn() -> u32 {func}>` in the current scope
26 --> $DIR/issue-2392.rs:42:12
28 LL | struct Obj<F> where F: FnOnce() -> u32 {
29 | -------------------------------------- method `closure` not found for this
31 LL | o_func.closure();
32 | ^^^^^^^ field, not a method
33 help: to call the function stored in `closure`, surround the field access with parentheses
35 LL | (o_func.closure)();
38 error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope
39 --> $DIR/issue-2392.rs:45:14
41 LL | struct BoxedObj {
42 | --------------- method `boxed_closure` not found for this
44 LL | boxed_fn.boxed_closure();
45 | ^^^^^^^^^^^^^ field, not a method
46 help: to call the function stored in `boxed_closure`, surround the field access with parentheses
48 LL | (boxed_fn.boxed_closure)();
51 error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope
52 --> $DIR/issue-2392.rs:48:19
54 LL | struct BoxedObj {
55 | --------------- method `boxed_closure` not found for this
57 LL | boxed_closure.boxed_closure();
58 | ^^^^^^^^^^^^^ field, not a method
59 help: to call the function stored in `boxed_closure`, surround the field access with parentheses
61 LL | (boxed_closure.boxed_closure)();
64 error[E0599]: no method named `closure` found for type `Obj<fn() -> u32 {func}>` in the current scope
65 --> $DIR/issue-2392.rs:53:12
67 LL | struct Obj<F> where F: FnOnce() -> u32 {
68 | -------------------------------------- method `closure` not found for this
70 LL | w.wrap.closure();
71 | ^^^^^^^ field, not a method
72 help: to call the function stored in `closure`, surround the field access with parentheses
74 LL | (w.wrap.closure)();
77 error[E0599]: no method named `not_closure` found for type `Obj<fn() -> u32 {func}>` in the current scope
78 --> $DIR/issue-2392.rs:55:12
80 LL | struct Obj<F> where F: FnOnce() -> u32 {
81 | -------------------------------------- method `not_closure` not found for this
83 LL | w.wrap.not_closure();
84 | ^^^^^^^^^^^-- help: remove the arguments
88 error[E0599]: no method named `closure` found for type `Obj<std::boxed::Box<(dyn std::ops::FnOnce() -> u32 + 'static)>>` in the current scope
89 --> $DIR/issue-2392.rs:58:24
91 LL | struct Obj<F> where F: FnOnce() -> u32 {
92 | -------------------------------------- method `closure` not found for this
94 LL | check_expression().closure();
95 | ^^^^^^^ field, not a method
96 help: to call the function stored in `closure`, surround the field access with parentheses
98 LL | (check_expression().closure)();
101 error[E0599]: no method named `f1` found for type `FuncContainer` in the current scope
102 --> $DIR/issue-2392.rs:64:31
104 LL | struct FuncContainer {
105 | -------------------- method `f1` not found for this
107 LL | (*self.container).f1(1);
108 | ^^ field, not a method
109 help: to call the function stored in `f1`, surround the field access with parentheses
111 LL | ((*self.container).f1)(1);
114 error[E0599]: no method named `f2` found for type `FuncContainer` in the current scope
115 --> $DIR/issue-2392.rs:65:31
117 LL | struct FuncContainer {
118 | -------------------- method `f2` not found for this
120 LL | (*self.container).f2(1);
121 | ^^ field, not a method
122 help: to call the function stored in `f2`, surround the field access with parentheses
124 LL | ((*self.container).f2)(1);
127 error[E0599]: no method named `f3` found for type `FuncContainer` in the current scope
128 --> $DIR/issue-2392.rs:66:31
130 LL | struct FuncContainer {
131 | -------------------- method `f3` not found for this
133 LL | (*self.container).f3(1);
134 | ^^ field, not a method
135 help: to call the function stored in `f3`, surround the field access with parentheses
137 LL | ((*self.container).f3)(1);
140 error: aborting due to 11 previous errors
142 For more information about this error, try `rustc --explain E0599`.