summaryrefslogtreecommitdiffstats
path: root/tests/ui/explicit-tail-calls/become-outside.rs
blob: 51b4389c88fcdefcc35ae81c774afdc24de8ba4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// revisions: constant array
#![allow(incomplete_features)]
#![feature(explicit_tail_calls)]

#[cfg(constant)]
const _: () = {
    become f(); //[constant]~ error: become statement outside of function body
};

#[cfg(array)]
struct Bad([(); become f()]); //[array]~ error: become statement outside of function body

fn f() {}

fn main() {}