mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
18 lines
364 B
Rust
18 lines
364 B
Rust
#![allow(unused_variables)]
|
|
#![allow(unused_assignments)]
|
|
#![allow(dead_code)]
|
|
#![deny(unreachable_code)]
|
|
#![feature(type_ascription)]
|
|
|
|
fn a() {
|
|
// the `2` is unreachable:
|
|
let x: (usize, usize) = (return, 2); //~ ERROR unreachable
|
|
}
|
|
|
|
fn b() {
|
|
// the tuple is unreachable:
|
|
let x: (usize, usize) = (2, return); //~ ERROR unreachable
|
|
}
|
|
|
|
fn main() { }
|