1 #![feature(type_alias_impl_trait)]
5 fn call(x: Self) -> Self::Output;
9 fn plus_one(&mut self);
12 impl<'a> PlusOne for &'a mut i32 {
13 fn plus_one(&mut self) {
18 impl<T: PlusOne> Callable for T {
19 type Output = impl PlusOne;
20 fn call(t: T) -> Self::Output { t }
23 fn test<'a>(y: &'a mut i32) -> impl PlusOne {
24 <&'a mut i32 as Callable>::call(y)
25 //~^ ERROR hidden type for `impl PlusOne` captures lifetime that does not appear in bounds
30 let mut thing = test(&mut z);
31 let mut thing2 = test(&mut z);