]> git.lizzy.rs Git - rust.git/blob - tests/ui/confuse-field-and-method/issue-33784.stderr
Rollup merge of #107467 - WaffleLapkin:uneq, r=oli-obk
[rust.git] / tests / ui / confuse-field-and-method / issue-33784.stderr
1 error[E0599]: no method named `closure` found for reference `&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:45]>` in the current scope
2   --> $DIR/issue-33784.rs:27:7
3    |
4 LL |     p.closure();
5    |       ^^^^^^^ field, not a method
6    |
7 help: to call the function stored in `closure`, surround the field access with parentheses
8    |
9 LL |     (p.closure)();
10    |     +         +
11
12 error[E0599]: no method named `fn_ptr` found for reference `&&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:45]>` in the current scope
13   --> $DIR/issue-33784.rs:29:7
14    |
15 LL |     q.fn_ptr();
16    |       ^^^^^^ field, not a method
17    |
18 help: to call the function stored in `fn_ptr`, surround the field access with parentheses
19    |
20 LL |     (q.fn_ptr)();
21    |     +        +
22
23 error[E0599]: no method named `c_fn_ptr` found for reference `&D` in the current scope
24   --> $DIR/issue-33784.rs:32:7
25    |
26 LL |     s.c_fn_ptr();
27    |       ^^^^^^^^ field, not a method
28    |
29 help: to call the function stored in `c_fn_ptr`, surround the field access with parentheses
30    |
31 LL |     (s.c_fn_ptr)();
32    |     +          +
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0599`.