rust/tests/ui/explicit-tail-calls/callee_is_ref.stderr
2025-08-04 09:09:49 +02:00

38 lines
1.1 KiB
Text

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