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