blob: 90d4382e2ccf7f4db53eee90751a48962ce8f946 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#![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() { }
|