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

use std::fmt::Debug;

type Foo = impl Debug;

pub trait Yay { }
impl Yay for u32 { }

fn foo() {
    is_yay::<Foo>(); //~ ERROR: the trait bound `Foo: Yay` is not satisfied
}

fn is_yay<T: Yay>() { }

fn main() {}