1- error[E0599]: no method named `closure` found for struct `Obj<{
[email protected] :
37 :36}>` in the current scope
2- --> $DIR/issue-2392.rs:38 :15
1+ error[E0599]: no method named `closure` found for struct `Obj<{closure@$DIR/ issue-2392.rs:35 :36: 35:38 }>` in the current scope
2+ --> $DIR/issue-2392.rs:36 :15
33 |
44LL | struct Obj<F> where F: FnOnce() -> u32 {
55 | ------------- method `closure` not found for this struct
66...
77LL | o_closure.closure();
88 | ^^^^^^^ field, not a method
99 |
10- = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-2392.long-type-$LONG_TYPE_HASH.txt'
11- = note: consider using `--verbose` to print the full type name to the console
1210help: to call the closure stored in `closure`, surround the field access with parentheses
1311 |
1412LL | (o_closure.closure)();
1513 | + +
1614
17- error[E0599]: no method named `not_closure` found for struct `Obj<{
[email protected] :
37 :36}>` in the current scope
18- --> $DIR/issue-2392.rs:40 :15
15+ error[E0599]: no method named `not_closure` found for struct `Obj<{closure@$DIR/ issue-2392.rs:35 :36: 35:38 }>` in the current scope
16+ --> $DIR/issue-2392.rs:38 :15
1917 |
2018LL | struct Obj<F> where F: FnOnce() -> u32 {
2119 | ------------- method `not_closure` not found for this struct
@@ -24,12 +22,9 @@ LL | o_closure.not_closure();
2422 | ^^^^^^^^^^^-- help: remove the arguments
2523 | |
2624 | field, not a method
27- |
28- = note: the full name for the type has been written to '$TEST_BUILD_DIR/issue-2392.long-type-$LONG_TYPE_HASH.txt'
29- = note: consider using `--verbose` to print the full type name to the console
3025
3126error[E0599]: no method named `closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
32- --> $DIR/issue-2392.rs:44 :12
27+ --> $DIR/issue-2392.rs:42 :12
3328 |
3429LL | struct Obj<F> where F: FnOnce() -> u32 {
3530 | ------------- method `closure` not found for this struct
@@ -43,7 +38,7 @@ LL | (o_func.closure)();
4338 | + +
4439
4540error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
46- --> $DIR/issue-2392.rs:47 :14
41+ --> $DIR/issue-2392.rs:45 :14
4742 |
4843LL | struct BoxedObj {
4944 | --------------- method `boxed_closure` not found for this struct
@@ -57,7 +52,7 @@ LL | (boxed_fn.boxed_closure)();
5752 | + +
5853
5954error[E0599]: no method named `boxed_closure` found for struct `BoxedObj` in the current scope
60- --> $DIR/issue-2392.rs:50 :19
55+ --> $DIR/issue-2392.rs:48 :19
6156 |
6257LL | struct BoxedObj {
6358 | --------------- method `boxed_closure` not found for this struct
@@ -71,7 +66,7 @@ LL | (boxed_closure.boxed_closure)();
7166 | + +
7267
7368error[E0599]: no method named `closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
74- --> $DIR/issue-2392.rs:55 :12
69+ --> $DIR/issue-2392.rs:53 :12
7570 |
7671LL | struct Obj<F> where F: FnOnce() -> u32 {
7772 | ------------- method `closure` not found for this struct
@@ -85,7 +80,7 @@ LL | (w.wrap.closure)();
8580 | + +
8681
8782error[E0599]: no method named `not_closure` found for struct `Obj<fn() -> u32 {func}>` in the current scope
88- --> $DIR/issue-2392.rs:57 :12
83+ --> $DIR/issue-2392.rs:55 :12
8984 |
9085LL | struct Obj<F> where F: FnOnce() -> u32 {
9186 | ------------- method `not_closure` not found for this struct
@@ -96,7 +91,7 @@ LL | w.wrap.not_closure();
9691 | field, not a method
9792
9893error[E0599]: no method named `closure` found for struct `Obj<Box<(dyn FnOnce() -> u32 + 'static)>>` in the current scope
99- --> $DIR/issue-2392.rs:60 :24
94+ --> $DIR/issue-2392.rs:58 :24
10095 |
10196LL | struct Obj<F> where F: FnOnce() -> u32 {
10297 | ------------- method `closure` not found for this struct
@@ -110,7 +105,7 @@ LL | (check_expression().closure)();
110105 | + +
111106
112107error[E0599]: no method named `f1` found for struct `FuncContainer` in the current scope
113- --> $DIR/issue-2392.rs:66 :31
108+ --> $DIR/issue-2392.rs:64 :31
114109 |
115110LL | struct FuncContainer {
116111 | -------------------- method `f1` not found for this struct
@@ -124,7 +119,7 @@ LL | ((*self.container).f1)(1);
124119 | + +
125120
126121error[E0599]: no method named `f2` found for struct `FuncContainer` in the current scope
127- --> $DIR/issue-2392.rs:67 :31
122+ --> $DIR/issue-2392.rs:65 :31
128123 |
129124LL | struct FuncContainer {
130125 | -------------------- method `f2` not found for this struct
@@ -138,7 +133,7 @@ LL | ((*self.container).f2)(1);
138133 | + +
139134
140135error[E0599]: no method named `f3` found for struct `FuncContainer` in the current scope
141- --> $DIR/issue-2392.rs:68 :31
136+ --> $DIR/issue-2392.rs:66 :31
142137 |
143138LL | struct FuncContainer {
144139 | -------------------- method `f3` not found for this struct
0 commit comments