]> git.lizzy.rs Git - rust.git/blob - tests/ui/for-loop-while/loop-diverges.rs
Rollup merge of #104965 - zacklukem:p-option-as_ref-docs, r=scottmcm
[rust.git] / tests / ui / for-loop-while / loop-diverges.rs
1 // run-pass
2 #![allow(unused_parens)]
3 // pretty-expanded FIXME #23616
4
5 /* Make sure a loop{} can be the tailexpr in the body
6 of a diverging function */
7
8 fn forever() -> ! {
9   loop{}
10 }
11
12 pub fn main() {
13   if (1 == 2) { forever(); }
14 }