You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That seems to say that you always needexplicit lifetimes when working with structs, but, that's not true, is it? A quick peek ahead at structs, and lifetimes seem to be implicit there: https://doc.rust-lang.org/nightly/book/structs.html
This As you can see, structs can also have lifetimes. also made me realize I'm misinterpreting the above sentence.
EDIT: Ok but now I'm not sure again, there's that need again: So why do we need a lifetime here? We need to ensure that any reference to a Foo cannot outlive the reference to an i32 it contains.