]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/nested_type_alias_impl_trait.rs
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / type-alias-impl-trait / nested_type_alias_impl_trait.rs
1 #![feature(type_alias_impl_trait)]
2 // build-pass (FIXME(62277): could be check-pass?)
3 mod my_mod {
4   use std::fmt::Debug;
5
6   pub type Foo = impl Debug;
7   pub type Foot = impl Debug;
8
9   pub fn get_foo() -> Foo {
10       5i32
11   }
12
13   pub fn get_foot() -> Foot {
14       get_foo()
15   }
16 }
17
18 fn main() {
19     let _: my_mod::Foot = my_mod::get_foot();
20 }