about summary refs log tree commit diff
path: root/tests/ui/explicit-tail-calls/callee_is_ref.stderr
blob: 4a2ff465e6820292e1e6d212bee19cfc65741315 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
error: tail calls can only be performed with function definitions or pointers
  --> $DIR/callee_is_ref.rs:8:12
   |
LL |     become (&f)()
   |            ^^^^^^
   |
   = note: callee has type `&fn() {f}`
help: consider dereferencing the expression to get a function definition
   |
LL |     become (*(&f))()
   |            ++    +

error: tail calls can only be performed with function definitions or pointers
  --> $DIR/callee_is_ref.rs:14:16
   |
LL |         become fun();
   |                ^^^^^
   |
   = note: callee has type `&fn()`
help: consider dereferencing the expression to get a function pointer
   |
LL |         become (*fun)();
   |                ++   +

error: tail calls can only be performed with function definitions or pointers
  --> $DIR/callee_is_ref.rs:19:12
   |
LL |     become Box::new(&mut &f)();
   |            ^^^^^^^^^^^^^^^^^^^
   |
   = note: callee has type `Box<&mut &fn() {f}>`
help: consider dereferencing the expression to get a function definition
   |
LL |     become (***Box::new(&mut &f))();
   |            ++++                 +

error: aborting due to 3 previous errors