File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ public enum MemoryLayout<T> {
7676 }
7777}
7878
79+ @available ( * , unavailable)
80+ extension MemoryLayout : _BitwiseCopyable { }
81+
7982extension MemoryLayout {
8083 /// Returns the contiguous memory footprint of the given instance.
8184 ///
Original file line number Diff line number Diff line change 11// RUN: %target-typecheck-verify-swift \
2- // RUN: -disable-availability-checking \
32// RUN: -enable-experimental-feature NonescapableTypes \
43// RUN: -enable-experimental-feature BitwiseCopyable \
54// RUN: -enable-builtin-module \
@@ -35,3 +34,5 @@ func take<T : _BitwiseCopyable>(_ t: T) {}
3534
3635func passInternalUsableStruct( _ s: InternalUsableStruct ) { take ( s) } // expected-error{{type_does_not_conform_decl_owner}}
3736 // expected-note@-8{{where_requirement_failure_one_subst}}
37+
38+ func passMemoryLayout< T> ( _ m: MemoryLayout < T > ) { take ( m) } // expected-error{{conformance_availability_unavailable}}
You can’t perform that action at this time.
0 commit comments