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 mismatched types
9 fn f<'a: 'static>(t: &'a str) -> X<'a> {
10 //~^ WARNING unnecessary lifetime parameter
14 fn extend_lt<'a>(o: &'a str) -> &'static str {
15 X::<'_>::from(o).into()
20 let s = "abcdef".to_string();