rust/src/test/ui/suggestions/confuse-field-and-method/issue-2392.stderr

124 lines
5.3 KiB
Plaintext
Raw Normal View History

2017-11-20 06:13:27 -06:00
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
2017-03-27 16:54:15 -05:00
|
2017-11-20 06:13:27 -06:00
28 | struct Obj<F> where F: FnOnce() -> u32 {
| -------------------------------------- method `closure` not found for this
...
2017-11-20 06:13:27 -06:00
61 | o_closure.closure(); //~ ERROR no method named `closure` found
2017-03-27 16:54:15 -05:00
| ^^^^^^^ field, not a method
|
= help: use `(o_closure.closure)(...)` if you meant to call the function stored in the `closure` field
2017-11-20 06:13:27 -06:00
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
2017-03-27 16:54:15 -05:00
|
2017-11-20 06:13:27 -06:00
28 | struct Obj<F> where F: FnOnce() -> u32 {
| -------------------------------------- method `not_closure` not found for this
...
2017-11-20 06:13:27 -06:00
65 | o_closure.not_closure();
2017-03-27 16:54:15 -05:00
| ^^^^^^^^^^^ field, not a method
|
= help: did you mean to write `o_closure.not_closure` instead of `o_closure.not_closure(...)`?
2017-05-27 12:58:52 -05:00
error[E0599]: no method named `closure` found for type `Obj<fn() -> u32 {func}>` in the current scope
2017-11-20 06:13:27 -06:00
--> $DIR/issue-2392.rs:71:12
2017-03-27 16:54:15 -05:00
|
2017-11-20 06:13:27 -06:00
28 | struct Obj<F> where F: FnOnce() -> u32 {
| -------------------------------------- method `closure` not found for this
...
2017-11-20 06:13:27 -06:00
71 | o_func.closure(); //~ ERROR no method named `closure` found
2017-03-27 16:54:15 -05:00
| ^^^^^^^ field, not a method
|
= help: use `(o_func.closure)(...)` if you meant to call the function stored in the `closure` field
2017-05-27 12:58:52 -05:00
error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope
2017-11-20 06:13:27 -06:00
--> $DIR/issue-2392.rs:76:14
2017-03-27 16:54:15 -05:00
|
2017-11-20 06:13:27 -06:00
39 | struct BoxedObj {
| --------------- method `boxed_closure` not found for this
...
2017-11-20 06:13:27 -06:00
76 | boxed_fn.boxed_closure();//~ ERROR no method named `boxed_closure` found
2017-03-27 16:54:15 -05:00
| ^^^^^^^^^^^^^ field, not a method
|
= help: use `(boxed_fn.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field
2017-05-27 12:58:52 -05:00
error[E0599]: no method named `boxed_closure` found for type `BoxedObj` in the current scope
2017-11-20 06:13:27 -06:00
--> $DIR/issue-2392.rs:81:19
2017-03-27 16:54:15 -05:00
|
2017-11-20 06:13:27 -06:00
39 | struct BoxedObj {
| --------------- method `boxed_closure` not found for this
...
2017-11-20 06:13:27 -06:00
81 | boxed_closure.boxed_closure();//~ ERROR no method named `boxed_closure` found
2017-03-27 16:54:15 -05:00
| ^^^^^^^^^^^^^ field, not a method
|
= help: use `(boxed_closure.boxed_closure)(...)` if you meant to call the function stored in the `boxed_closure` field
2017-05-27 12:58:52 -05:00
error[E0599]: no method named `closure` found for type `Obj<fn() -> u32 {func}>` in the current scope
2017-11-20 06:13:27 -06:00
--> $DIR/issue-2392.rs:88:12
2017-03-27 16:54:15 -05:00
|
2017-11-20 06:13:27 -06:00
28 | struct Obj<F> where F: FnOnce() -> u32 {
| -------------------------------------- method `closure` not found for this
...
2017-11-20 06:13:27 -06:00
88 | w.wrap.closure();//~ ERROR no method named `closure` found
2017-03-27 16:54:15 -05:00
| ^^^^^^^ field, not a method
|
= help: use `(w.wrap.closure)(...)` if you meant to call the function stored in the `closure` field
2017-05-27 12:58:52 -05:00
error[E0599]: no method named `not_closure` found for type `Obj<fn() -> u32 {func}>` in the current scope
2017-11-20 06:13:27 -06:00
--> $DIR/issue-2392.rs:92:12
2017-03-27 16:54:15 -05:00
|
2017-11-20 06:13:27 -06:00
28 | struct Obj<F> where F: FnOnce() -> u32 {
| -------------------------------------- method `not_closure` not found for this
...
2017-11-20 06:13:27 -06:00
92 | w.wrap.not_closure();
2017-03-27 16:54:15 -05:00
| ^^^^^^^^^^^ field, not a method
|
= help: did you mean to write `w.wrap.not_closure` instead of `w.wrap.not_closure(...)`?
2017-05-27 12:58:52 -05:00
error[E0599]: no method named `closure` found for type `Obj<std::boxed::Box<std::boxed::FnBox<(), Output=u32> + 'static>>` in the current scope
2017-11-20 06:13:27 -06:00
--> $DIR/issue-2392.rs:97:24
2017-03-27 16:54:15 -05:00
|
2017-11-20 06:13:27 -06:00
28 | struct Obj<F> where F: FnOnce() -> u32 {
| -------------------------------------- method `closure` not found for this
...
2017-11-20 06:13:27 -06:00
97 | check_expression().closure();//~ ERROR no method named `closure` found
2017-03-27 16:54:15 -05:00
| ^^^^^^^ field, not a method
|
= help: use `(check_expression().closure)(...)` if you meant to call the function stored in the `closure` field
2017-05-27 12:58:52 -05:00
error[E0599]: no method named `f1` found for type `FuncContainer` in the current scope
2017-11-20 06:13:27 -06:00
--> $DIR/issue-2392.rs:105:31
|
15 | struct FuncContainer {
| -------------------- method `f1` not found for this
...
2017-11-20 06:13:27 -06:00
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
2017-03-27 16:54:15 -05:00
2017-05-27 12:58:52 -05:00
error[E0599]: no method named `f2` found for type `FuncContainer` in the current scope
2017-11-20 06:13:27 -06:00
--> $DIR/issue-2392.rs:108:31
|
15 | struct FuncContainer {
| -------------------- method `f2` not found for this
...
2017-11-20 06:13:27 -06:00
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
2017-03-27 16:54:15 -05:00
2017-05-27 12:58:52 -05:00
error[E0599]: no method named `f3` found for type `FuncContainer` in the current scope
2017-11-20 06:13:27 -06:00
--> $DIR/issue-2392.rs:111:31
2017-03-27 16:54:15 -05:00
|
15 | struct FuncContainer {
| -------------------- method `f3` not found for this
...
2017-11-20 06:13:27 -06:00
111 | (*self.container).f3(1); //~ ERROR no method named `f3` found
2017-03-27 16:54:15 -05:00
| ^^ 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
2017-03-27 16:54:15 -05:00