mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Find all the usages of `--enable-experimental-feature` or `--enable-upcoming-feature` in the tests and replace some of the `REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which should correctly apply to depending on the asserts/noasserts mode of the toolchain for each feature. Remove some comments that talked about enabling asserts since they don't apply anymore (but I might had miss some). All this was done with an automated script, so some formatting weirdness might happen, but I hope I fixed most of those. There might be some tests that were `REQUIRES: asserts` that might run in `noasserts` toolchains now. This will normally be because their feature went from experimental to upcoming/base and the tests were not updated.
43 lines
2.0 KiB
Swift
43 lines
2.0 KiB
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// FIXME: Remove '-disable-experimental-parser-round-trip' (rdar://137636751).
|
|
|
|
// RUN: %target-swift-frontend -swift-version 5 -enable-library-evolution -emit-module \
|
|
// RUN: -enable-experimental-feature NonescapableTypes \
|
|
// RUN: -o %t/lifetime_dependence.swiftmodule \
|
|
// RUN: -emit-module-interface-path %t/lifetime_dependence.swiftinterface \
|
|
// RUN: -disable-experimental-parser-round-trip \
|
|
// RUN: %S/Inputs/lifetime_dependence.swift
|
|
|
|
// Check the interfaces
|
|
|
|
// RUN: %FileCheck %s < %t/lifetime_dependence.swiftinterface
|
|
|
|
// See if we can compile a module through just the interface and typecheck using it.
|
|
|
|
// RUN: %target-swift-frontend -compile-module-from-interface \
|
|
// RUN: -enable-experimental-feature NonescapableTypes \
|
|
// RUN: -disable-experimental-parser-round-trip \
|
|
// RUN: %t/lifetime_dependence.swiftinterface -o %t/lifetime_dependence.swiftmodule
|
|
|
|
// RUN: %target-swift-frontend -typecheck -I %t %s \
|
|
// RUN: -disable-experimental-parser-round-trip \
|
|
// RUN: -enable-experimental-feature NonescapableTypes
|
|
|
|
// REQUIRES: swift_feature_NonescapableTypes
|
|
|
|
import lifetime_dependence
|
|
// CHECK: @lifetime(borrow a)
|
|
// CHECK-NEXT: @inlinable internal init(_ ptr: Swift.UnsafeRawBufferPointer, _ a: borrowing Swift.Array<Swift.Int>) {
|
|
// CHECK: @lifetime(a)
|
|
// CHECK-NEXT: @inlinable internal init(_ ptr: Swift.UnsafeRawBufferPointer, _ a: consuming lifetime_dependence.AnotherView) {
|
|
|
|
// CHECK: @lifetime(x)
|
|
// CHECK-NEXT: @inlinable public func derive(_ x: consuming lifetime_dependence.BufferView) -> lifetime_dependence.BufferView {
|
|
|
|
// CHECK: @lifetime(view)
|
|
// CHECK-NEXT: @inlinable public func consumeAndCreate(_ view: consuming lifetime_dependence.BufferView) -> lifetime_dependence.BufferView {
|
|
|
|
// CHECK: @lifetime(this, that)
|
|
// CHECK-NEXT: @inlinable public func deriveThisOrThat(_ this: consuming lifetime_dependence.BufferView, _ that: consuming lifetime_dependence.BufferView) -> lifetime_dependence.BufferView {
|