blob: e74a7daec88286ee16181bf4e0cb9a97d3d37087 [file] [log] [blame]
#![allow(unused_variables)]
#![allow(unused_assignments)]
#![allow(dead_code)]
#![deny(unreachable_code)]
struct Foo;
impl Foo {
fn foo(&self, x: !, y: usize) { }
fn bar(&self, x: !) { }
}
fn a() {
// the `22` is unreachable:
Foo.foo(return, 22); //~ ERROR unreachable
}
fn b() {
// the call is unreachable:
Foo.bar(return); //~ ERROR unreachable
}
fn main() { }