]> git.lizzy.rs Git - rust.git/blob - tests/ui/reachable/expr_call.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / reachable / expr_call.rs
1 #![feature(never_type)]
2 #![allow(unused_variables)]
3 #![allow(unused_assignments)]
4 #![allow(dead_code)]
5 #![deny(unreachable_code)]
6
7 fn foo(x: !, y: usize) { }
8
9 fn bar(x: !) { }
10
11 fn a() {
12     // the `22` is unreachable:
13     foo(return, 22); //~ ERROR unreachable
14 }
15
16 fn b() {
17     // the call is unreachable:
18     bar(return); //~ ERROR unreachable
19 }
20
21 fn main() { }