]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/impl_trait_for_tait_bound2.rs
Rollup merge of #106766 - GuillaumeGomez:rm-stripper-dead-code, r=notriddle
[rust.git] / tests / ui / type-alias-impl-trait / impl_trait_for_tait_bound2.rs
1 #![feature(type_alias_impl_trait)]
2
3 use std::fmt::Debug;
4
5 type Foo = impl Debug;
6
7 pub trait Yay { }
8 impl Yay for u32 { }
9
10 fn foo() {
11     is_yay::<Foo>(); //~ ERROR: the trait bound `Foo: Yay` is not satisfied
12 }
13
14 fn is_yay<T: Yay>() { }
15
16 fn main() {}