The following code doesn't compile:

```
trait Phone {
    fn call(&self);
}

struct IPhone<'a> {
    my_str: &'a str
}

impl<'a> Phone for IPhone<'a> {
    fn call(&self) {
        print!("{}", self.my_str);
    }
}

trait Factory<'a, P: Phone> {
    fn new_phone(&self, ms: &'a str) -> P;
}

struct IPhoneFactory;
impl<'a> Factory<'a, IPhone<'a>> for IPhoneFactory {
    fn new_phone(&self, ms: &'a str) -> IPhone<'a> {
        return IPhone {
            my_str: ms
        };
    }
}

fn call_phone<'a, P: Phone, F: Factory<'a, P>>(f: F) {
    for _ in 0..10 {
        let s = String::new();
        let p = f.new_phone(s.as_str());
        p.call();
    }
}

fn main() {
    call_phone(IPhoneFactory);
}

```

I get the following error:

```none
error: `s` does not live long enough
        let p = f.new_phone(s.as_str());
                            ^
note: reference must be valid for the lifetime 'a as defined on the block at 28:53...
 fn call_phone<'a, P: Phone, F: Factory<'a, P>>(f: F) {
                                                      ^
note: ...but borrowed value is only valid for the block suffix following statement 0 at 30:30
        let s = String::new();
                              ^

```

I want to be able to have a factory that returns an abstract class, but when that class takes a reference I can't figure out how to specify the lifetime properly.