about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorJonathan Turner <jonathandturner@users.noreply.github.com>2016-10-14 12:07:07 -0700
committerGitHub <noreply@github.com>2016-10-14 12:07:07 -0700
commit71a183f8e933a06892295c4bec16c10c2d1a8472 (patch)
treedc66eef46f70bd797574ff8923e707aec4ce02cf /src/test/incremental/thinlto
parentcd0c70f430d00bc9ef850ec3ce0816ecd2aa88cc (diff)
parentcb90723f90ca68093e6030b1d4f94e8e9e5062ee (diff)
downloadrust-71a183f8e933a06892295c4bec16c10c2d1a8472.tar.gz
rust-71a183f8e933a06892295c4bec16c10c2d1a8472.zip
Rollup merge of #36755 - Rantanen:master, r=GuillaumeGomez
Explain motivation behind lifetimes

Start the lifetime section with an explanation of the issues that lack of explicit lifetimes cause and how the explicit lifetimes solve these.

----------------

I had really hard time figuring out why I would need to care about the explicit reference lifetimes when going through the book at first. With strong background in C++, I'm familiar with the dangling reference problem - but given the section seems to focus more on the lifetime syntax and various ways to define lifetimes on functions and structs, I was unable to understand how they are used to solve the reference problem.

This PR is an attempt at getting the reader to understand what the explicit lifetimes are used for and why they are an awesome thing instead of a bit of syntax that just has to be written.

It's been less than a week that I've been diving into Rust so I'm far from certain about the terminology and technical correctness. I tried mimicking the existing terminology from the lifetimes section, but still no promises on getting it right.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions