Files
swift-mirror/lib/Serialization
Andrew Trick b7e2186f7d Support @_lifetime(immortal) to suppress inout default dependency
Non-Escapable 'inout' arguments have a default self-dependency, regardless of
any other annotations.  For example:

    @_lifetime(dest: copy source)
    /* DEFAULT: @_lifetime(dest: copy dest, copy source) */
    func foo<T: ~Escapable>(dest: inout T, source: T)

An immortal lifetime specifier now suppresses that default. For example:

    @_lifetime(dest: immortal, copy source)
    /* DEFAULT: @_lifetime(dest: copy source) */
    func foo<T: ~Escapable>(dest: inout T, source: T)

This is necessary because there is otherwise no other way to suppress the
default lifetime.

Fixes rdar://170016708 ([nonescapable] Support @_lifetime(immortal) to suppress
the usual inout default self-dependency)
2026-02-11 05:55:26 -08:00
..