File tree Expand file tree Collapse file tree 4 files changed +6
-31
lines changed
test/api-digester/Outputs
validation-test/compiler_crashers_2_fixed Expand file tree Collapse file tree 4 files changed +6
-31
lines changed Original file line number Diff line number Diff line change @@ -93,34 +93,6 @@ extension _Pointer {
93
93
guard let unwrapped = other else { return nil }
94
94
self . init ( unwrapped. _rawValue)
95
95
}
96
-
97
- // all pointers are creatable from mutable pointers
98
-
99
- /// Creates a new pointer from the given mutable pointer.
100
- ///
101
- /// Use this initializer to explicitly convert `other` to an `UnsafeRawPointer`
102
- /// instance. This initializer creates a new pointer to the same address as
103
- /// `other` and performs no allocation or copying.
104
- ///
105
- /// - Parameter other: The typed pointer to convert.
106
- @_transparent
107
- public init < T> ( _ other: UnsafeMutablePointer < T > ) {
108
- self . init ( other. _rawValue)
109
- }
110
-
111
- /// Creates a new raw pointer from the given typed pointer.
112
- ///
113
- /// Use this initializer to explicitly convert `other` to an `UnsafeRawPointer`
114
- /// instance. This initializer creates a new pointer to the same address as
115
- /// `other` and performs no allocation or copying.
116
- ///
117
- /// - Parameter other: The typed pointer to convert. If `other` is `nil`, the
118
- /// result is `nil`.
119
- @_transparent
120
- public init ? < T> ( _ other: UnsafeMutablePointer < T > ? ) {
121
- guard let unwrapped = other else { return nil }
122
- self . init ( unwrapped)
123
- }
124
96
}
125
97
126
98
// well, this is pretty annoying
Original file line number Diff line number Diff line change @@ -126,7 +126,8 @@ extension _StringGuts {
126
126
}
127
127
128
128
_internalInvariant ( mutPtr. pointee != nil )
129
- return UnsafePointer ( mutPtr)
129
+ // assuming optional class reference and class reference can alias
130
+ return UnsafeRawPointer ( mutPtr) . assumingMemoryBound ( to: _StringBreadcrumbs. self)
130
131
}
131
132
132
133
@inline ( never) // slow-path
@@ -137,6 +138,6 @@ extension _StringGuts {
137
138
// Thread-safe compare-and-swap
138
139
let crumbs = _StringBreadcrumbs ( String ( self ) )
139
140
_stdlib_atomicInitializeARCRef (
140
- object: UnsafeMutablePointer ( mutPtr) , desired: crumbs)
141
+ object: UnsafeMutablePointer ( mutating : UnsafeRawPointer ( mutPtr) . assumingMemoryBound ( to : Optional < AnyObject > . self ) ) , desired: crumbs)
141
142
}
142
143
}
Original file line number Diff line number Diff line change @@ -85,3 +85,5 @@ Subscript String.UnicodeScalarView.subscript(_:) has been removed
85
85
Subscript Substring.subscript(_:) has been removed
86
86
87
87
Func Collection.makeIterator() has self access kind changing from NonMutating to __Consuming
88
+
89
+ Constructor _Pointer.init(_:) has been removed
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public func XUAllSubclassesOfClass<T: AnyObject>(_ aClass: T.Type) -> [T.Type] {
46
46
free ( memory)
47
47
}
48
48
49
- let classesPtr = memory. assumingMemoryBound ( to: Optional < AnyClass> . self )
49
+ let classesPtr = memory. assumingMemoryBound ( to: AnyClass . self)
50
50
let classes = AutoreleasingUnsafeMutablePointer < AnyClass > ( classesPtr)
51
51
numClasses = objc_getClassList ( classes, numClasses)
52
52
You can’t perform that action at this time.
0 commit comments