1 // Make sure that we check that impl trait types implement the traits that they
4 #![feature(type_alias_impl_trait)]
6 type X<'a> = impl Into<&'static str> + From<&'a str>;
7 //~^ ERROR unconstrained opaque type
9 fn f<'a: 'static>(t: &'a str) -> X<'a> {
10 //~^ WARNING unnecessary lifetime parameter
12 //~^ ERROR non-defining opaque type use
15 fn extend_lt<'a>(o: &'a str) -> &'static str {
16 X::<'_>::from(o).into()
21 let s = "abcdef".to_string();