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> {
76
76
}
77
77
}
78
78
79
+ @available ( * , unavailable)
80
+ extension MemoryLayout : _BitwiseCopyable { }
81
+
79
82
extension MemoryLayout {
80
83
/// Returns the contiguous memory footprint of the given instance.
81
84
///
Original file line number Diff line number Diff line change 1
1
// RUN: %target-typecheck-verify-swift \
2
- // RUN: -disable-availability-checking \
3
2
// RUN: -enable-experimental-feature NonescapableTypes \
4
3
// RUN: -enable-experimental-feature BitwiseCopyable \
5
4
// RUN: -enable-builtin-module \
@@ -35,3 +34,5 @@ func take<T : _BitwiseCopyable>(_ t: T) {}
35
34
36
35
func passInternalUsableStruct( _ s: InternalUsableStruct ) { take ( s) } // expected-error{{type_does_not_conform_decl_owner}}
37
36
// 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