Skip to content

Commit 77b907e

Browse files
committed
fixup! [stdlib] MemoryLayout: Add support for non-copyable type arguments
1 parent da1d097 commit 77b907e

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

test/stdlib/Noncopyables/MemoryLayout.swift

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-run-simple-swift | %FileCheck %s
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-run-simple-swift(-enable-experimental-feature NoncopyableGenerics) | %FileCheck %s
23
// REQUIRES: executable_test, noncopyable_generics
34

45
struct A: ~Copyable {
@@ -26,14 +27,14 @@ print("alignment: \(actualAlignment1 == expectedAlignment)")
2627

2728
let a = A(42)
2829

29-
let actualSize2 = MemoryLayout.size(of: a)
30-
// CHECK: size(of:): true
31-
print("size(of:): \(actualSize2 == expectedSize)")
30+
let actualSize2 = MemoryLayout.size(ofValue: a)
31+
// CHECK: size(ofValue:): true
32+
print("size(ofValue:): \(actualSize2 == expectedSize)")
3233

33-
let actualStride2 = MemoryLayout.stride(of: a)
34-
// CHECK: stride(of:): true
35-
print("stride(of:): \(actualStride2 == expectedStride)")
34+
let actualStride2 = MemoryLayout.stride(ofValue: a)
35+
// CHECK: stride(ofValue:): true
36+
print("stride(ofValue:): \(actualStride2 == expectedStride)")
3637

37-
let actualAlignment2 = MemoryLayout.alignment(of: a)
38-
// CHECK: alignment(of:): true
39-
print("alignment(of:): \(actualAlignment2 == expectedAlignment)")
38+
let actualAlignment2 = MemoryLayout.alignment(ofValue: a)
39+
// CHECK: alignment(ofValue:): true
40+
print("alignment(ofValue:): \(actualAlignment2 == expectedAlignment)")

0 commit comments

Comments
 (0)