2021-05-21 14:01:38 +02:00
|
|
|
error[E0599]: no method named `closure` found for struct `Obj` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:36:15
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct Obj<F> where F: FnOnce() -> u32 {
|
2022-07-01 16:47:26 -07:00
|
|
|
| ------------- method `closure` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | o_closure.closure();
|
2017-03-27 14:54:15 -07:00
|
|
|
| ^^^^^^^ field, not a method
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
help: to call the function stored in `closure`, surround the field access with parentheses
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
LL | (o_closure.closure)();
|
2021-06-21 19:07:19 -07:00
|
|
|
| + +
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2021-05-21 14:01:38 +02:00
|
|
|
error[E0599]: no method named `not_closure` found for struct `Obj` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:38:15
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct Obj<F> where F: FnOnce() -> u32 {
|
2022-07-01 16:47:26 -07:00
|
|
|
| ------------- method `not_closure` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | o_closure.not_closure();
|
2019-03-19 15:54:21 -04:00
|
|
|
| ^^^^^^^^^^^-- help: remove the arguments
|
|
|
|
| |
|
|
|
|
| field, not a method
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2021-05-21 14:01:38 +02:00
|
|
|
error[E0599]: no method named `closure` found for struct `Obj` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:42:12
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct Obj<F> where F: FnOnce() -> u32 {
|
2022-07-01 16:47:26 -07:00
|
|
|
| ------------- method `closure` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | o_func.closure();
|
2017-03-27 14:54:15 -07:00
|
|
|
| ^^^^^^^ field, not a method
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
help: to call the function stored in `closure`, surround the field access with parentheses
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
LL | (o_func.closure)();
|
2021-06-21 19:07:19 -07:00
|
|
|
| + +
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2020-01-08 08:05:31 -08:00
|
|
|
error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:45:14
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct BoxedObj {
|
2022-07-01 16:47:26 -07:00
|
|
|
| --------------- method `boxed_closure` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | boxed_fn.boxed_closure();
|
2017-03-27 14:54:15 -07:00
|
|
|
| ^^^^^^^^^^^^^ field, not a method
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
help: to call the function stored in `boxed_closure`, surround the field access with parentheses
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
LL | (boxed_fn.boxed_closure)();
|
2021-06-21 19:07:19 -07:00
|
|
|
| + +
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2020-01-08 08:05:31 -08:00
|
|
|
error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:48:19
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct BoxedObj {
|
2022-07-01 16:47:26 -07:00
|
|
|
| --------------- method `boxed_closure` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | boxed_closure.boxed_closure();
|
2017-03-27 14:54:15 -07:00
|
|
|
| ^^^^^^^^^^^^^ field, not a method
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
help: to call the function stored in `boxed_closure`, surround the field access with parentheses
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
LL | (boxed_closure.boxed_closure)();
|
2021-06-21 19:07:19 -07:00
|
|
|
| + +
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2021-05-21 14:01:38 +02:00
|
|
|
error[E0599]: no method named `closure` found for struct `Obj` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:53:12
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct Obj<F> where F: FnOnce() -> u32 {
|
2022-07-01 16:47:26 -07:00
|
|
|
| ------------- method `closure` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | w.wrap.closure();
|
2017-03-27 14:54:15 -07:00
|
|
|
| ^^^^^^^ field, not a method
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
help: to call the function stored in `closure`, surround the field access with parentheses
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
LL | (w.wrap.closure)();
|
2021-06-21 19:07:19 -07:00
|
|
|
| + +
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2021-05-21 14:01:38 +02:00
|
|
|
error[E0599]: no method named `not_closure` found for struct `Obj` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:55:12
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct Obj<F> where F: FnOnce() -> u32 {
|
2022-07-01 16:47:26 -07:00
|
|
|
| ------------- method `not_closure` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | w.wrap.not_closure();
|
2019-03-19 15:54:21 -04:00
|
|
|
| ^^^^^^^^^^^-- help: remove the arguments
|
|
|
|
| |
|
|
|
|
| field, not a method
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2021-05-21 14:01:38 +02:00
|
|
|
error[E0599]: no method named `closure` found for struct `Obj` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:58:24
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct Obj<F> where F: FnOnce() -> u32 {
|
2022-07-01 16:47:26 -07:00
|
|
|
| ------------- method `closure` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | check_expression().closure();
|
2017-03-27 14:54:15 -07:00
|
|
|
| ^^^^^^^ field, not a method
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
help: to call the function stored in `closure`, surround the field access with parentheses
|
2017-03-27 14:54:15 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
LL | (check_expression().closure)();
|
2021-06-21 19:07:19 -07:00
|
|
|
| + +
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2020-01-08 08:05:31 -08:00
|
|
|
error[E0599]: no method named `f1` found for struct `FuncContainer` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:64:31
|
2017-12-10 23:29:24 +03:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct FuncContainer {
|
2022-07-01 16:47:26 -07:00
|
|
|
| -------------------- method `f1` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | (*self.container).f1(1);
|
2017-12-10 23:29:24 +03:00
|
|
|
| ^^ field, not a method
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
help: to call the function stored in `f1`, surround the field access with parentheses
|
2017-12-10 23:29:24 +03:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
LL | ((*self.container).f1)(1);
|
2021-06-21 19:07:19 -07:00
|
|
|
| + +
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2020-01-08 08:05:31 -08:00
|
|
|
error[E0599]: no method named `f2` found for struct `FuncContainer` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:65:31
|
2017-12-10 23:29:24 +03:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct FuncContainer {
|
2022-07-01 16:47:26 -07:00
|
|
|
| -------------------- method `f2` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | (*self.container).f2(1);
|
2017-12-10 23:29:24 +03:00
|
|
|
| ^^ field, not a method
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
help: to call the function stored in `f2`, surround the field access with parentheses
|
2017-12-10 23:29:24 +03:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
LL | ((*self.container).f2)(1);
|
2021-06-21 19:07:19 -07:00
|
|
|
| + +
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2020-01-08 08:05:31 -08:00
|
|
|
error[E0599]: no method named `f3` found for struct `FuncContainer` in the current scope
|
2019-05-24 08:55:33 +02:00
|
|
|
--> $DIR/issue-2392.rs:66:31
|
2017-12-10 23:29:24 +03:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | struct FuncContainer {
|
2022-07-01 16:47:26 -07:00
|
|
|
| -------------------- method `f3` not found for this struct
|
2017-11-15 22:18:52 -08:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | (*self.container).f3(1);
|
2017-12-10 23:29:24 +03:00
|
|
|
| ^^ field, not a method
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
help: to call the function stored in `f3`, surround the field access with parentheses
|
2017-12-10 23:29:24 +03:00
|
|
|
|
|
2019-03-19 15:54:21 -04:00
|
|
|
LL | ((*self.container).f3)(1);
|
2021-06-21 19:07:19 -07:00
|
|
|
| + +
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2017-07-02 13:49:30 +03:00
|
|
|
error: aborting due to 11 previous errors
|
2017-03-27 14:54:15 -07:00
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about this error, try `rustc --explain E0599`.
|