summaryrefslogtreecommitdiffstats
path: root/src/test/ui/reachable/expr_type.rs
blob: 8d32397b54248a8479e9c6fc7cc29af55d22f008 (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 = {return}: !; //~ ERROR unreachable
}

fn main() { }