]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/call-on-missing.stderr
Rollup merge of #107354 - tspiteri:source-serif-4.005, r=GuillaumeGomez
[rust.git] / tests / ui / suggestions / call-on-missing.stderr
1 error[E0599]: no method named `bar` found for fn item `fn() -> Foo {foo}` in the current scope
2   --> $DIR/call-on-missing.rs:12:9
3    |
4 LL |     foo.bar();
5    |         ^^^ method not found in `fn() -> Foo {foo}`
6    |
7 help: use parentheses to call this function
8    |
9 LL |     foo().bar();
10    |        ++
11
12 error[E0609]: no field `i` on type `fn() -> Foo {foo}`
13   --> $DIR/call-on-missing.rs:16:9
14    |
15 LL |     foo.i;
16    |         ^
17    |
18 help: use parentheses to call this function
19    |
20 LL |     foo().i;
21    |        ++
22
23 error[E0599]: no method named `bar` found for struct `Box<dyn Fn() -> Foo>` in the current scope
24   --> $DIR/call-on-missing.rs:22:14
25    |
26 LL |     callable.bar();
27    |              ^^^ method not found in `Box<dyn Fn() -> Foo>`
28    |
29 help: use parentheses to call this trait object
30    |
31 LL |     callable().bar();
32    |             ++
33
34 error[E0609]: no field `i` on type `Box<dyn Fn() -> Foo>`
35   --> $DIR/call-on-missing.rs:26:14
36    |
37 LL |     callable.i;
38    |              ^ unknown field
39    |
40 help: use parentheses to call this trait object
41    |
42 LL |     callable().i;
43    |             ++
44
45 error[E0599]: no method named `bar` found for type parameter `T` in the current scope
46   --> $DIR/call-on-missing.rs:32:7
47    |
48 LL | fn type_param<T: Fn() -> Foo>(t: T) {
49    |               - method `bar` not found for this type parameter
50 LL |     t.bar();
51    |       ^^^ method not found in `T`
52    |
53 help: use parentheses to call this type parameter
54    |
55 LL |     t().bar();
56    |      ++
57
58 error[E0609]: no field `i` on type `T`
59   --> $DIR/call-on-missing.rs:36:7
60    |
61 LL | fn type_param<T: Fn() -> Foo>(t: T) {
62    |               - type parameter 'T' declared here
63 ...
64 LL |     t.i;
65    |       ^
66    |
67 help: use parentheses to call this type parameter
68    |
69 LL |     t().i;
70    |      ++
71
72 error: aborting due to 6 previous errors
73
74 Some errors have detailed explanations: E0599, E0609.
75 For more information about an error, try `rustc --explain E0599`.