rust/tests/ui/coercion/coerce-to-bang-cast.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
188 B
Rust
Raw Normal View History

#![feature(never_type)]
2017-03-24 12:35:49 -05:00
fn cast_a() {
let y = {return; 22} as !;
//~^ ERROR non-primitive cast
2017-03-24 12:35:49 -05:00
}
fn cast_b() {
2017-06-09 15:04:29 -05:00
let y = 22 as !; //~ ERROR non-primitive cast
2017-03-24 12:35:49 -05:00
}
fn main() { }