Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No, the following would be valid (if a little pointless):

fn foo(x: &'a T) -> &'a T { x }



Your example changed the type of the function, though. I'm assuming there is no `&T` in the function's output type.


Oh sorry; I had misunderstood the question.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: