summaryrefslogtreecommitdiffstats
path: root/src/test/ui/reachable/expr_type.rs
blob: 1ceb2f85971602c13fbfac0d6551ba35f9745988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![allow(unused_variables)]
#![allow(unused_assignments)]
#![allow(dead_code)]
#![deny(unreachable_code)]
#![feature(never_type, type_ascription)]

fn a() {
    // the cast is unreachable:
    let x = type_ascribe!({return}, !); //~ ERROR unreachable
}

fn main() { }