// RUN: %target-sil-opt \ // RUN: %s \ // RUN: -enable-experimental-feature Lifetimes \ // RUN: | \ // RUN: %target-sil-opt \ // RUN: -enable-experimental-feature Lifetimes \ // RUN: | \ // RUN: %FileCheck %s // REQUIRES: swift_feature_Lifetimes // For -enable-experimental-feature Lifetimes // TODO: Once NoncopyableGenerics/NonescapableTypes is no longer behind a feature flag, merge this into basic2. sil_stage raw import Swift // CHECK-LABEL: struct NCG : ~Copyable { // CHECK-NEXT: var t: T // CHECK-NEXT: deinit struct NCG : ~Copyable { var t: T deinit } // CHECK-LABEL: struct NEG : ~Escapable where T : ~Escapable { // CHECK-NEXT: var t: T struct NEG : ~Escapable { var t: T @_lifetime(copy t) init(_ t: consuming T) { self.t = t } }