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