3 ms·
(You have a tiny typo; you forgot the <'a>. Also, I know you know this, but for those that don't, this signature could be written as fn rust_foo(a: &str) ->
by steveklabnik 5y ago
(You have a tiny typo; you forgot the <'a>. Also, I know you know this, but for those that don't, this signature could be written as
fn rust_foo(a: &str) -> &str { ... }
but Arnavion is trying to be explicit here to make a steelman.)
- Arnavion 5y agoYeah, I fixed that typo. And yes, foo is arbitrary, so one can assume it has another * / & parameter such that the lifetimes can't be elided any more.