summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/nested-tait-inference3.rs
blob: ebf3a99bbf9f09ae56bee7390c12aee4d6f0a487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![feature(type_alias_impl_trait)]
#![allow(dead_code)]

use std::fmt::Debug;

type FooX = impl Debug;

trait Foo<A> { }

impl Foo<FooX> for () { }
//~^ cannot implement trait on type alias impl trait

fn foo() -> impl Foo<FooX> {
    ()
}

fn main() { }