summaryrefslogtreecommitdiffstats
path: root/tests/ui/reachable/expr_repeat.rs
blob: 0fd13c6cb8e7c19189ab53037b72f9fc1dbb5e11 (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(type_ascription)]

fn a() {
    // the repeat is unreachable:
    let x: [usize; 2] = [return; 2]; //~ ERROR unreachable
}

fn main() { }