From 58163468fa5718d93cdd6d29732a9cd7f89f429c Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 20 Oct 2026 22:37:44 +0200 Subject: [PATCH] aliasing model summary: fix incorrect definition of liveness --- src/behavior-considered-undefined.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/behavior-considered-undefined.md b/src/behavior-considered-undefined.md index ff34d0af28..7d05938419 100644 --- a/src/behavior-considered-undefined.md +++ b/src/behavior-considered-undefined.md @@ -35,7 +35,7 @@ r[undefined.alias] * For references, the liveness duration is upper-bounded by the syntactic lifetime assigned by the borrow checker; it cannot be live any *longer* than that lifetime. * Each time a reference or box is dereferenced or reborrowed, it is considered live. * Each time a reference or box is passed to or returned from a function, it is considered live. - * When a reference (but not a `Box`!) is passed to a function, it is live at least as long as that function call, again except if the `&T` contains an [`UnsafeCell`]. + * When a reference (but not a `Box`!) is passed to a function, it is live at least as long as that function call. As an exception, for shared references `&T`, the reference does not have to remain live for data inside an [`UnsafeCell`]. All this also applies when values of these types are passed in a (nested) field of a compound type, but not behind pointer indirections.