summary refs log tree commit diff
path: root/src/test/compile-fail/uninhabited-enum-cast.rs
blob: c4a5dc4710cba6da5ea53045302eaa057998fa1f (plain)
1
2
3
4
5
6
7
enum E {}

fn f(e: E) {
    println((e as int).to_str());   //~ ERROR non-scalar cast
}

fn main() {}