summary refs log tree commit diff
path: root/src/test/run-fail/cast-never.rs
blob: 0b05a4b911284e942e3fb163add9699f92806d74 (plain)
1
2
3
4
5
6
7
8
9
10
// Test that we can explicitly cast ! to another type

// error-pattern:explicit

#![feature(never_type)]

fn main() {
    let x: ! = panic!();
    let y: u32 = x as u32;
}