How does this make sense:
If the reference can’t live at least as long as the variable does, then at some point r will be a dangling pointer. We say that the reference’s lifetime must contain or enclose the variable’s.
Shouldn't it be:
If the reference can’t live at least as long as the variable does, then at some point r will be a dangling pointer. We say that the variable’s lifetime must contain or enclose the reference’s.