mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
13 lines
258 B
Rust
13 lines
258 B
Rust
#![feature(never_type)]
|
|
#![allow(unused_variables)]
|
|
#![allow(unused_assignments)]
|
|
#![allow(dead_code)]
|
|
#![deny(unreachable_code)]
|
|
|
|
fn foo() {
|
|
let x: ! = * { return; }; //~ ERROR unreachable
|
|
//~| ERROR type `!` cannot be dereferenced
|
|
}
|
|
|
|
fn main() { }
|