From 96c8e13def6573d7933008120e800521e85c36dc Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Thu, 23 Jan 2025 15:21:54 +0000 Subject: [PATCH] Ownership controls lifetimes --- src/lifetimes/lifetime-annotations.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lifetimes/lifetime-annotations.md b/src/lifetimes/lifetime-annotations.md index c3024ea55ccc..e352f19d4f9d 100644 --- a/src/lifetimes/lifetime-annotations.md +++ b/src/lifetimes/lifetime-annotations.md @@ -12,9 +12,14 @@ also be explicit: `&'a Point`, `&'document str`. Lifetimes start with `'` and `'a` is a typical default name. Read `&'a Point` as "a borrowed `Point` which is valid for at least the lifetime `a`". +Only ownership, not lifetime annotations, control when objects are destroyed and +determine the concrete lifetime of a given value. The borrow checker just +ensures this is done safely. + Explicit lifetime annotations, like types, are required on function signatures (but can be elided in common cases). These provide information for inference at -callsites and within the function body. +callsites and within the function body, helping the borrow checker to do its +job.