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

fn a() {
    // Here we issue that the "2nd-innermost" return is unreachable,
    // but we stop there.
    let x = {return {return {return;}}}; //~ ERROR unreachable
}

fn main() { }