error[E0599]: no method named `closure` found for type `Obj<[closure@$DIR/issue-2392.rs:60:36: 60:41]>` in the current scope --> $DIR/issue-2392.rs:61:15 | 28 | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... 61 | o_closure.closure(); //~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(o_closure.closure)(...)` if you meant to call the function stored in the `closure` field error[E0599]: no method named `not_closure` found for type `Obj<[closure@$DIR/issue-2392.rs:60:36: 60:41]>` in the current scope --> $DIR/issue-2392.rs:65:15 | 28 | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `not_closure` not found for this ... 65 | o_closure.not_closure(); | ^^^^^^^^^^^ field, not a method | = help: did you mean to write `o_closure.not_closure` instead of `o_closure.not_closure(...)`? error[E0599]: no method named `closure` found for type `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:71:12 | 28 | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... 71 | o_func.closure(); //~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(o_func.closure)(...)` if you meant to call the function stored in the `closure` field error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope --> $DIR/issue-2392.rs:76:14 | 39 | struct BoxedObj { | --------------- method `boxed_closure` not found for this ... 76 | boxed_fn.boxed_closure();//~ ERROR no method named `boxed_closure` found | ^^^^^^^^^^^^^ field, not a method | = help: use `(boxed_fn.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope --> $DIR/issue-2392.rs:81:19 | 39 | struct BoxedObj { | --------------- method `boxed_closure` not found for this ... 81 | boxed_closure.boxed_closure();//~ ERROR no method named `boxed_closure` found | ^^^^^^^^^^^^^ field, not a method | = help: use `(boxed_closure.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field error[E0599]: no method named `closure` found for type `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:88:12 | 28 | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... 88 | w.wrap.closure();//~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(w.wrap.closure)(...)` if you meant to call the function stored in the `closure` field error[E0599]: no method named `not_closure` found for type `Obj u32 {func}>` in the current scope --> $DIR/issue-2392.rs:92:12 | 28 | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `not_closure` not found for this ... 92 | w.wrap.not_closure(); | ^^^^^^^^^^^ field, not a method | = help: did you mean to write `w.wrap.not_closure` instead of `w.wrap.not_closure(...)`? error[E0599]: no method named `closure` found for type `Obj + 'static>>` in the current scope --> $DIR/issue-2392.rs:97:24 | 28 | struct Obj where F: FnOnce() -> u32 { | -------------------------------------- method `closure` not found for this ... 97 | check_expression().closure();//~ ERROR no method named `closure` found | ^^^^^^^ field, not a method | = help: use `(check_expression().closure)(...)` if you meant to call the function stored in the `closure` field error[E0599]: no method named `f1` found for type `FuncContainer` in the current scope --> $DIR/issue-2392.rs:105:31 | 15 | struct FuncContainer { | -------------------- method `f1` not found for this ... 105 | (*self.container).f1(1); //~ ERROR no method named `f1` found | ^^ field, not a method | = help: use `((*self.container).f1)(...)` if you meant to call the function stored in the `f1` field error[E0599]: no method named `f2` found for type `FuncContainer` in the current scope --> $DIR/issue-2392.rs:108:31 | 15 | struct FuncContainer { | -------------------- method `f2` not found for this ... 108 | (*self.container).f2(1); //~ ERROR no method named `f2` found | ^^ field, not a method | = help: use `((*self.container).f2)(...)` if you meant to call the function stored in the `f2` field error[E0599]: no method named `f3` found for type `FuncContainer` in the current scope --> $DIR/issue-2392.rs:111:31 | 15 | struct FuncContainer { | -------------------- method `f3` not found for this ... 111 | (*self.container).f3(1); //~ ERROR no method named `f3` found | ^^ field, not a method | = help: use `((*self.container).f3)(...)` if you meant to call the function stored in the `f3` field error: aborting due to 11 previous errors