[Strict memory safety] Update standard library for nested safe/unsafe types

Use this to mark a few internal types @safe now that it works properly.
This commit is contained in:
Doug Gregor
2025-04-19 19:54:32 -07:00
parent 53ca902267
commit 457eb4cc64
18 changed files with 326 additions and 315 deletions

View File

@@ -287,7 +287,7 @@ extension Set._Variant {
return (false, unsafe asNative.uncheckedElement(at: bucket))
}
let isUnique = self.isUniquelyReferenced()
unsafe asNative.insertNew(element, at: bucket, isUnique: isUnique)
asNative.insertNew(element, at: bucket, isUnique: isUnique)
return (true, element)
}
@@ -305,7 +305,7 @@ extension Set._Variant {
}
#endif
let isUnique = isUniquelyReferenced()
let bucket = unsafe asNative.validatedBucket(for: index)
let bucket = asNative.validatedBucket(for: index)
return unsafe asNative.uncheckedRemove(at: bucket, isUnique: isUnique)
}