It is possible for structs to hold references, but when we do that, we need to add a lifetime annotation
on every reference we created.
So let's quickly create a new structure.
We're going to call it my string.
And then inside of here, we're going to add a text field and we'll give it a reference to a string
slice so we can tell that we already are getting an error and it says we're missing a lifetime parameter,
so let's give it one.
And then also up here, we're going to have to declare it.
So now everything is happy.
But why do we have to do this?
Well, we have to do this because when we create an instance of my string, which let's just go ahead
and do that.
So we'll create a string from and then this is my string and then we're going to create an X, which
is going to be my string instance and we're going to set it text store one dot as string slice.
So we have to implicitly.
Explicitly declare the lifetime because we want to make sure that the instance of my string cannot outlive
the reference it holds in its text field, which in this case is string one.
Because if my string lives longer than the string we created here, which is what we passed in as a
string slice, then we would end up having a dangling reference up here.
So that's just a really good example of why lifetime annotations are important and how they're going
to help us prevent our code from having dangling references.