2 // Tests that you can use a fn lifetime parameter as part of
3 // the value for a type parameter in a bound.
7 fn get(&self) -> &'a isize;
10 #[derive(Copy, Clone)]
15 impl<'a> GetRef<'a> for Box<'a> {
16 fn get(&self) -> &'a isize {
22 fn add<'b,G:GetRef<'b>>(&self, g2: G) -> isize {
28 let b1 = Box { t: &3 };
29 assert_eq!(b1.add(b1), 6);