]> git.lizzy.rs Git - rust.git/blob - tests/ui/reachable/unreachable-in-call.rs
Rollup merge of #106701 - ibraheemdev:sync-sender-spin, r=Amanieu
[rust.git] / tests / ui / reachable / unreachable-in-call.rs
1 #![allow(dead_code)]
2 #![deny(unreachable_code)]
3
4 fn diverge() -> ! { panic!() }
5
6 fn get_u8() -> u8 {
7     1
8 }
9 fn call(_: u8, _: u8) {
10
11 }
12 fn diverge_first() {
13     call(diverge(),
14          get_u8()); //~ ERROR unreachable expression
15 }
16 fn diverge_second() {
17     call( //~ ERROR unreachable call
18         get_u8(),
19         diverge());
20 }
21
22 fn main() {}