rust/tests/ui/never_type/adjust_never.rs

11 lines
163 B
Rust

// Test that a variable of type ! can coerce to another type.
//@ check-pass
#![feature(never_type)]
fn main() {
let x: ! = panic!();
let y: u32 = x;
}