Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/behavior-considered-undefined.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<U>`].
* 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<U>`].

All this also applies when values of these types are passed in a (nested) field of a compound type, but not behind pointer indirections.

Expand Down
Loading