2017-03-21 08:41:41 -05:00
|
|
|
#![allow(unused_variables)]
|
|
|
|
#![allow(unused_assignments)]
|
|
|
|
#![allow(dead_code)]
|
|
|
|
#![deny(unreachable_code)]
|
|
|
|
#![feature(type_ascription)]
|
|
|
|
|
|
|
|
fn a() {
|
|
|
|
// the `2` is unreachable:
|
2017-11-20 06:13:27 -06:00
|
|
|
let x: (usize, usize) = (return, 2); //~ ERROR unreachable
|
2017-03-21 08:41:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn b() {
|
|
|
|
// the tuple is unreachable:
|
2017-11-20 06:13:27 -06:00
|
|
|
let x: (usize, usize) = (2, return); //~ ERROR unreachable
|
2017-03-21 08:41:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() { }
|