When do you need an annotation?
The compiler applies lifetime elision rules: if a function takes only one reference, the result gets its lifetime; if a method takes &self, the result gets the lifetime of self. That is why fn first_word(text: &str) -> &str works without annotations. When the compiler does ask for one, ask yourself: “which input does the result borrow from?”. 'static is a reference that lives for the whole program — string literals, for example.