summary refs log tree commit diff
path: root/src/test/ui/reachable/expr_unary.rs
blob: e229d22ebc798053202ab241897fb3b498ed6c61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(never_type)]
#![allow(unused_variables)]
#![allow(unused_assignments)]
#![allow(dead_code)]
#![deny(unreachable_code)]

fn foo() {
    let x: ! = ! { return; }; //~ ERROR unreachable
    //~| ERROR cannot apply unary operator `!` to type `!`
}

fn main() { }