And then to wrap up this section, I want to talk about static lifetimes.
When we give a reference, a static lifetime, the reference can live for the entire duration of the
program.
All string literals have a static lifetime.
So let's see what this looks like real quick.
So we're going to say let s of a reference with a static lifetime string slice equal.
I have a static lifetime and it's valid.
So when we give the string literal a static lifetime, the text of the string is stored directly in
the program's binary, so it is always available, some will suggest, to use static lifetimes and error
messages, but you will want to consider whether you want something to live that long or not.
Most lifetime errors will result from dangling references.
So it is better to just fix the problem the correct way than to assign it a static lifetime.