rust/src/test/run-pass/unreachable-code-1.rs
Niko Matsakis 2db4259b35 Stop inferring bot/static when types/regions are unconstrained.
Also, some other changes that came up along the way:
- add a 'blk' region for the current block.
- detect unused type/region variables.
2012-04-30 19:53:02 -07:00

14 lines
183 B
Rust

// xfail-pretty
fn id(x: bool) -> bool { x }
fn call_id() {
let c <- fail;
id(c); //! WARNING unreachable statement
}
fn call_id_3() { id(ret) && id(ret); }
fn main() {
}