Oh Rust, you be fickle sometimes! Today during a live stream I was exploring a lifetime issue, and I came up with this:
gist.github.comFickle lifetimesFickle lifetimes. GitHub Gist: instantly share code, notes, and snippets.
Oh Rust, you be fickle sometimes! Today during a live stream I was exploring a lifetime issue, and I came up with this:
At an initial glance it seems like both functions should compile, after all the only difference is that we are returning an alias, right? SPOILER AHEAD: So why does the function returning an alias work while the other one doesn't? The answer can be found here: doc.rust-lang.org/reference/li...
0 reposts2 likes