]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coercion/coerce-to-bang-cast.rs
Auto merge of #103600 - compiler-errors:early-binder-nits, r=spastorino
[rust.git] / src / test / ui / coercion / coerce-to-bang-cast.rs
1 #![feature(never_type)]
2
3 fn cast_a() {
4     let y = {return; 22} as !;
5     //~^ ERROR non-primitive cast
6 }
7
8 fn cast_b() {
9     let y = 22 as !; //~ ERROR non-primitive cast
10 }
11
12 fn main() { }