1 // Test that we do not yet support elision in associated types, even 2 // when there is just one name we could take from the impl header. 3 4 #![allow(warnings)] 5 6 trait MyTrait { 7 type Output; 8 } 9 10 impl MyTrait for &i32 { 11 type Output = &i32; 12 //~^ ERROR missing lifetime specifier 13 } 14 15 impl MyTrait for &u32 { 16 type Output = &'_ i32; 17 //~^ ERROR missing lifetime specifier 18 } 19 20 // This is what you have to do: 21 impl<'a> MyTrait for &'a f32 { 22 type Output = &'a f32; 23 } 24 main()25fn main() { } 26