rust/tests/ui/reachable/expr_type.rs

13 lines
268 B
Rust

#![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() { }