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 17:35:49 +00:00
fn cast_a() {
let y = {return; 22} as !;
//~^ ERROR non-primitive cast
2017-03-24 17:35:49 +00:00
}
fn cast_b() {
2017-06-09 20:04:29 +00:00
let y = 22 as !; //~ ERROR non-primitive cast
2017-03-24 17:35:49 +00:00
}
fn main() { }