fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
1.2 KiB36 linesraw
1error[E0599]: no method named `closure` found for type `&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope
2  --> $DIR/issue-33784.rs:27:7
3   |
4LL |     p.closure();
5   |       ^^^^^^^ field, not a method
6   |
7help: to call the function stored in `closure`, surround the field access with parentheses
8   |
9LL |     (p.closure)();
10   |     ^         ^
11
12error[E0599]: no method named `fn_ptr` found for type `&&Obj<[closure@$DIR/issue-33784.rs:25:43: 25:48]>` in the current scope
13  --> $DIR/issue-33784.rs:29:7
14   |
15LL |     q.fn_ptr();
16   |       ^^^^^^ field, not a method
17   |
18help: to call the function stored in `fn_ptr`, surround the field access with parentheses
19   |
20LL |     (q.fn_ptr)();
21   |     ^        ^
22
23error[E0599]: no method named `c_fn_ptr` found for type `&D` in the current scope
24  --> $DIR/issue-33784.rs:32:7
25   |
26LL |     s.c_fn_ptr();
27   |       ^^^^^^^^ field, not a method
28   |
29help: to call the function stored in `c_fn_ptr`, surround the field access with parentheses
30   |
31LL |     (s.c_fn_ptr)();
32   |     ^          ^
33
34error: aborting due to 3 previous errors
35
36For more information about this error, try `rustc --explain E0599`.