summaryrefslogtreecommitdiffstats
path: root/tests/ui/coercion/coerce-to-bang-cast.rs
blob: 85598a42eccd9bdc26534ab1752ca3987afb1227 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(never_type)]

fn cast_a() {
    let y = {return; 22} as !;
    //~^ ERROR non-primitive cast
}

fn cast_b() {
    let y = 22 as !; //~ ERROR non-primitive cast
}

fn main() { }