]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lazy-type-alias-impl-trait/recursion.rs
Rollup merge of #99460 - JanBeh:PR_asref_asmut_docs, r=joshtriplett
[rust.git] / src / test / ui / lazy-type-alias-impl-trait / recursion.rs
1 #![feature(type_alias_impl_trait)]
2
3 // check-pass
4
5 type Foo = impl std::fmt::Debug;
6
7 fn foo(b: bool) -> Foo {
8     if b {
9         return 42
10     }
11     let x: u32 = foo(false);
12     99
13 }
14
15 fn bar(b: bool) -> impl std::fmt::Debug {
16     if b {
17         return 42
18     }
19     let x: u32 = bar(false);
20     99
21 }
22
23 fn main() {}