]>
Commit | Line | Data |
---|---|---|
dc9dc135 XL |
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 | |
cc61c64b | 3 | | |
0531ce1d | 4 | LL | struct Obj<F> where F: FnOnce() -> u32 { |
ff7c6d11 XL |
5 | | -------------------------------------- method `closure` not found for this |
6 | ... | |
532ac7d7 | 7 | LL | o_closure.closure(); |
cc61c64b | 8 | | ^^^^^^^ field, not a method |
532ac7d7 | 9 | help: to call the function stored in `closure`, surround the field access with parentheses |
cc61c64b | 10 | | |
532ac7d7 XL |
11 | LL | (o_closure.closure)(); |
12 | | ^ ^ | |
cc61c64b | 13 | |
dc9dc135 XL |
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 | |
cc61c64b | 16 | | |
0531ce1d | 17 | LL | struct Obj<F> where F: FnOnce() -> u32 { |
ff7c6d11 XL |
18 | | -------------------------------------- method `not_closure` not found for this |
19 | ... | |
0531ce1d | 20 | LL | o_closure.not_closure(); |
532ac7d7 XL |
21 | | ^^^^^^^^^^^-- help: remove the arguments |
22 | | | | |
23 | | field, not a method | |
cc61c64b | 24 | |
7cac9316 | 25 | error[E0599]: no method named `closure` found for type `Obj<fn() -> u32 {func}>` in the current scope |
dc9dc135 | 26 | --> $DIR/issue-2392.rs:42:12 |
cc61c64b | 27 | | |
0531ce1d | 28 | LL | struct Obj<F> where F: FnOnce() -> u32 { |
ff7c6d11 XL |
29 | | -------------------------------------- method `closure` not found for this |
30 | ... | |
532ac7d7 | 31 | LL | o_func.closure(); |
cc61c64b | 32 | | ^^^^^^^ field, not a method |
532ac7d7 | 33 | help: to call the function stored in `closure`, surround the field access with parentheses |
cc61c64b | 34 | | |
532ac7d7 XL |
35 | LL | (o_func.closure)(); |
36 | | ^ ^ | |
cc61c64b | 37 | |
7cac9316 | 38 | error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope |
dc9dc135 | 39 | --> $DIR/issue-2392.rs:45:14 |
cc61c64b | 40 | | |
0531ce1d | 41 | LL | struct BoxedObj { |
ff7c6d11 XL |
42 | | --------------- method `boxed_closure` not found for this |
43 | ... | |
532ac7d7 | 44 | LL | boxed_fn.boxed_closure(); |
cc61c64b | 45 | | ^^^^^^^^^^^^^ field, not a method |
532ac7d7 | 46 | help: to call the function stored in `boxed_closure`, surround the field access with parentheses |
cc61c64b | 47 | | |
532ac7d7 XL |
48 | LL | (boxed_fn.boxed_closure)(); |
49 | | ^ ^ | |
cc61c64b | 50 | |
7cac9316 | 51 | error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope |
dc9dc135 | 52 | --> $DIR/issue-2392.rs:48:19 |
cc61c64b | 53 | | |
0531ce1d | 54 | LL | struct BoxedObj { |
ff7c6d11 XL |
55 | | --------------- method `boxed_closure` not found for this |
56 | ... | |
532ac7d7 | 57 | LL | boxed_closure.boxed_closure(); |
cc61c64b | 58 | | ^^^^^^^^^^^^^ field, not a method |
532ac7d7 | 59 | help: to call the function stored in `boxed_closure`, surround the field access with parentheses |
cc61c64b | 60 | | |
532ac7d7 XL |
61 | LL | (boxed_closure.boxed_closure)(); |
62 | | ^ ^ | |
cc61c64b | 63 | |
7cac9316 | 64 | error[E0599]: no method named `closure` found for type `Obj<fn() -> u32 {func}>` in the current scope |
dc9dc135 | 65 | --> $DIR/issue-2392.rs:53:12 |
cc61c64b | 66 | | |
0531ce1d | 67 | LL | struct Obj<F> where F: FnOnce() -> u32 { |
ff7c6d11 XL |
68 | | -------------------------------------- method `closure` not found for this |
69 | ... | |
532ac7d7 | 70 | LL | w.wrap.closure(); |
cc61c64b | 71 | | ^^^^^^^ field, not a method |
532ac7d7 | 72 | help: to call the function stored in `closure`, surround the field access with parentheses |
cc61c64b | 73 | | |
532ac7d7 XL |
74 | LL | (w.wrap.closure)(); |
75 | | ^ ^ | |
cc61c64b | 76 | |
7cac9316 | 77 | error[E0599]: no method named `not_closure` found for type `Obj<fn() -> u32 {func}>` in the current scope |
dc9dc135 | 78 | --> $DIR/issue-2392.rs:55:12 |
cc61c64b | 79 | | |
0531ce1d | 80 | LL | struct Obj<F> where F: FnOnce() -> u32 { |
ff7c6d11 XL |
81 | | -------------------------------------- method `not_closure` not found for this |
82 | ... | |
0531ce1d | 83 | LL | w.wrap.not_closure(); |
532ac7d7 XL |
84 | | ^^^^^^^^^^^-- help: remove the arguments |
85 | | | | |
86 | | field, not a method | |
cc61c64b | 87 | |
dc9dc135 XL |
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 | |
cc61c64b | 90 | | |
0531ce1d | 91 | LL | struct Obj<F> where F: FnOnce() -> u32 { |
ff7c6d11 XL |
92 | | -------------------------------------- method `closure` not found for this |
93 | ... | |
532ac7d7 | 94 | LL | check_expression().closure(); |
cc61c64b | 95 | | ^^^^^^^ field, not a method |
532ac7d7 | 96 | help: to call the function stored in `closure`, surround the field access with parentheses |
cc61c64b | 97 | | |
532ac7d7 XL |
98 | LL | (check_expression().closure)(); |
99 | | ^ ^ | |
cc61c64b | 100 | |
7cac9316 | 101 | error[E0599]: no method named `f1` found for type `FuncContainer` in the current scope |
dc9dc135 | 102 | --> $DIR/issue-2392.rs:64:31 |
cc61c64b | 103 | | |
0531ce1d | 104 | LL | struct FuncContainer { |
ff7c6d11 XL |
105 | | -------------------- method `f1` not found for this |
106 | ... | |
532ac7d7 | 107 | LL | (*self.container).f1(1); |
cc61c64b | 108 | | ^^ field, not a method |
532ac7d7 | 109 | help: to call the function stored in `f1`, surround the field access with parentheses |
cc61c64b | 110 | | |
532ac7d7 XL |
111 | LL | ((*self.container).f1)(1); |
112 | | ^ ^ | |
cc61c64b | 113 | |
7cac9316 | 114 | error[E0599]: no method named `f2` found for type `FuncContainer` in the current scope |
dc9dc135 | 115 | --> $DIR/issue-2392.rs:65:31 |
cc61c64b | 116 | | |
0531ce1d | 117 | LL | struct FuncContainer { |
ff7c6d11 XL |
118 | | -------------------- method `f2` not found for this |
119 | ... | |
532ac7d7 | 120 | LL | (*self.container).f2(1); |
cc61c64b | 121 | | ^^ field, not a method |
532ac7d7 | 122 | help: to call the function stored in `f2`, surround the field access with parentheses |
cc61c64b | 123 | | |
532ac7d7 XL |
124 | LL | ((*self.container).f2)(1); |
125 | | ^ ^ | |
cc61c64b | 126 | |
7cac9316 | 127 | error[E0599]: no method named `f3` found for type `FuncContainer` in the current scope |
dc9dc135 | 128 | --> $DIR/issue-2392.rs:66:31 |
ff7c6d11 | 129 | | |
0531ce1d | 130 | LL | struct FuncContainer { |
ff7c6d11 XL |
131 | | -------------------- method `f3` not found for this |
132 | ... | |
532ac7d7 | 133 | LL | (*self.container).f3(1); |
ff7c6d11 | 134 | | ^^ field, not a method |
532ac7d7 | 135 | help: to call the function stored in `f3`, surround the field access with parentheses |
ff7c6d11 | 136 | | |
532ac7d7 XL |
137 | LL | ((*self.container).f3)(1); |
138 | | ^ ^ | |
cc61c64b | 139 | |
041b39d2 | 140 | error: aborting due to 11 previous errors |
cc61c64b | 141 | |
0531ce1d | 142 | For more information about this error, try `rustc --explain E0599`. |