summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/type-alias-impl-trait-fns.rs
blob: 07c891f0638c7234d03092ced5ca513dec71971b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// check-pass

#![feature(type_alias_impl_trait)]

// Regression test for issue #61863

pub trait MyTrait {}

#[derive(Debug)]
pub struct MyStruct {
    v: u64,
}

impl MyTrait for MyStruct {}

pub fn bla() -> TE {
    return MyStruct { v: 1 };
}

pub fn bla2() -> TE {
    bla()
}

type TE = impl MyTrait;

fn main() {}