about summary refs log tree commit diff
path: root/tests/ui/explicit-tail-calls/become-uncallable.rs
blob: a73b9258aaabb1ded2d127bc0fb37db70ac52184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ run-rustfix
#![expect(incomplete_features)]
#![feature(explicit_tail_calls)]
#![allow(unused)]

fn f() -> u64 {
    become 1; //~ error: `become` requires a function call
}

fn g() {
    become { h() }; //~ error: `become` requires a function call
}

fn h() {
    become *&g(); //~ error: `become` requires a function call
}

fn main() {}