Skip to content

Typos: stdlib #75024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/cmake/modules/SwiftSource.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ function(_compile_swift_files
list(APPEND swift_flags "-swift-version" "5")
endif()

# Avoiding emiting ABI descriptor files while building stdlib.
# Avoiding emitting ABI descriptor files while building stdlib.
if (SWIFTFILE_IS_STDLIB)
list(APPEND swift_flags "-Xfrontend" "-empty-abi-descriptor")
endif()
Expand Down
4 changes: 2 additions & 2 deletions stdlib/include/llvm/ADT/STLExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ make_filter_range(RangeT &&Range, PredicateT Pred) {
/// somewhere between them. The constraints of these iterators are:
///
/// - On construction or after being incremented, it is comparable and
/// dereferencable. It is *not* incrementable.
/// - After being dereferenced, it is neither comparable nor dereferencable, it
/// dereferenceable. It is *not* incrementable.
/// - After being dereferenced, it is neither comparable nor dereferenceable, it
/// is only incrementable.
///
/// This means you can only dereference the iterator once, and you can only
Expand Down
4 changes: 2 additions & 2 deletions stdlib/include/llvm/Support/MathExtras.h
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ std::enable_if_t<std::is_signed<T>::value, T> AddOverflow(T X, T Y, T &Result) {
}

/// Subtract two signed integers, computing the two's complement truncated
/// result, returning true if an overflow ocurred.
/// result, returning true if an overflow occurred.
template <typename T>
std::enable_if_t<std::is_signed<T>::value, T> SubOverflow(T X, T Y, T &Result) {
#if __has_builtin(__builtin_sub_overflow)
Expand All @@ -932,7 +932,7 @@ std::enable_if_t<std::is_signed<T>::value, T> SubOverflow(T X, T Y, T &Result) {
}

/// Multiply two signed integers, computing the two's complement truncated
/// result, returning true if an overflow ocurred.
/// result, returning true if an overflow occurred.
template <typename T>
std::enable_if_t<std::is_signed<T>::value, T> MulOverflow(T X, T Y, T &Result) {
// Perform the unsigned multiplication on absolute values.
Expand Down
2 changes: 1 addition & 1 deletion stdlib/private/StdlibUnicodeUnittest/WordBreaking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//

// Normalization tests are currently only avaible on Darwin, awaiting a sensible
// Normalization tests are currently only available on Darwin, awaiting a sensible
// file API...
#if _runtime(_ObjC)
import Foundation
Expand Down
14 changes: 7 additions & 7 deletions stdlib/private/SwiftPrivate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ set(swift_swiftprivate_compile_flags
"-Xfrontend" "-disable-access-control")

if(SWIFT_BUILD_SDK_OVERLAY)
set(swift_swiftprivate_darwin_depencencies Darwin)
set(swift_swiftprivate_darwin_dependencies Darwin)
else()
set(swift_swiftprivate_darwin_depencencies)
set(swift_swiftprivate_darwin_dependencies)
endif()

add_swift_target_library(swiftSwiftPrivate ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
Expand All @@ -21,11 +21,11 @@ add_swift_target_library(swiftSwiftPrivate ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
GYB_SOURCES
AtomicInt.swift.gyb

SWIFT_MODULE_DEPENDS_OSX ${swift_swiftprivate_darwin_depencencies}
SWIFT_MODULE_DEPENDS_IOS ${swift_swiftprivate_darwin_depencencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_swiftprivate_darwin_depencencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_swiftprivate_darwin_depencencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_swiftprivate_darwin_depencencies}
SWIFT_MODULE_DEPENDS_OSX ${swift_swiftprivate_darwin_dependencies}
SWIFT_MODULE_DEPENDS_IOS ${swift_swiftprivate_darwin_dependencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_swiftprivate_darwin_dependencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_swiftprivate_darwin_dependencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_swiftprivate_darwin_dependencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
Expand Down
16 changes: 8 additions & 8 deletions stdlib/private/SwiftPrivateLibcExtras/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ else()
endif()

if(SWIFT_BUILD_SDK_OVERLAY)
set(swift_private_libc_extras_darwin_depencencies Darwin)
set(swift_private_libc_extras_darwin_dependencies Darwin)
else()
set(swift_private_libc_extras_darwin_depencencies)
set(swift_private_libc_extras_darwin_dependencies)
endif()

add_swift_target_library(swiftSwiftPrivateLibcExtras ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
Expand All @@ -31,12 +31,12 @@ add_swift_target_library(swiftSwiftPrivateLibcExtras ${SWIFT_STDLIB_LIBRARY_BUIL

SWIFT_MODULE_DEPENDS SwiftPrivate
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS} ${swift_private_libc_extras_flags}
SWIFT_MODULE_DEPENDS_OSX ${swift_private_libc_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_IOS ${swift_private_libc_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_private_libc_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_private_libc_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_XROS ${swift_private_libc_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_libc_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_OSX ${swift_private_libc_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_IOS ${swift_private_libc_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_private_libc_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_private_libc_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_XROS ${swift_private_libc_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_libc_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
Expand Down
2 changes: 1 addition & 1 deletion stdlib/private/SwiftPrivateLibcExtras/Subprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ int _stdlib_posix_spawn(pid_t *__restrict pid, const char * __restrict path,
return posix_spawn(pid, path, file_actions, attrp, argv, envp);
}

#endif // !defined(__ANDROID__) && !defined(__HAIKU__) && (!defined(_WIN32) || defined(__CGYWIN__)) && !defined(__wasi__)
#endif // !defined(__ANDROID__) && !defined(__HAIKU__) && (!defined(_WIN32) || defined(__CYGWIN__)) && !defined(__wasi__)

16 changes: 8 additions & 8 deletions stdlib/private/SwiftPrivateThreadExtras/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if(SWIFT_BUILD_SDK_OVERLAY)
set(swift_private_thread_extras_darwin_depencencies Darwin)
set(swift_private_thread_extras_darwin_dependencies Darwin)
else()
set(swift_private_thread_extras_darwin_depencencies)
set(swift_private_thread_extras_darwin_dependencies)
endif()

add_swift_target_library(swiftSwiftPrivateThreadExtras ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
Expand All @@ -12,12 +12,12 @@ add_swift_target_library(swiftSwiftPrivateThreadExtras ${SWIFT_STDLIB_LIBRARY_BU

"${SWIFT_SOURCE_DIR}/stdlib/linker-support/magic-symbols-for-install-name.c"

SWIFT_MODULE_DEPENDS_IOS ${swift_private_thread_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_OSX ${swift_private_thread_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_private_thread_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_private_thread_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_XROS ${swift_private_thread_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_thread_extras_darwin_depencencies}
SWIFT_MODULE_DEPENDS_IOS ${swift_private_thread_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_OSX ${swift_private_thread_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_private_thread_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_private_thread_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_XROS ${swift_private_thread_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_private_thread_extras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_FREESTANDING "${SWIFT_FREESTANDING_TEST_DEPENDENCIES}"
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
Expand Down
14 changes: 7 additions & 7 deletions stdlib/private/SwiftReflectionTest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
if(SWIFT_BUILD_SDK_OVERLAY)
set(swift_reflection_test_darwin_depencencies Darwin)
set(swift_reflection_test_darwin_dependencies Darwin)
else()
set(swift_reflection_test_darwin_depencencies)
set(swift_reflection_test_darwin_dependencies)
endif()

if (SWIFT_INCLUDE_TESTS AND SWIFT_BUILD_DYNAMIC_STDLIB)
add_swift_target_library(swiftSwiftReflectionTest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
SwiftReflectionTest.swift
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
SWIFT_COMPILE_FLAGS_LINUX -Xcc -D_GNU_SOURCE
SWIFT_MODULE_DEPENDS_OSX ${swift_reflection_test_darwin_depencencies}
SWIFT_MODULE_DEPENDS_IOS ${swift_reflection_test_darwin_depencencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_reflection_test_darwin_depencencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_reflection_test_darwin_depencencies}
SWIFT_MODULE_DEPENDS_XROS ${swift_reflection_test_darwin_depencencies}
SWIFT_MODULE_DEPENDS_OSX ${swift_reflection_test_darwin_dependencies}
SWIFT_MODULE_DEPENDS_IOS ${swift_reflection_test_darwin_dependencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_reflection_test_darwin_dependencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_reflection_test_darwin_dependencies}
SWIFT_MODULE_DEPENDS_XROS ${swift_reflection_test_darwin_dependencies}
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_LINUX_STATIC Musl
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/Concurrency/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ class DefaultActorImpl
/// It can be done when actor transitions from Idle to Scheduled or
/// when actor gets a priority override and we schedule a stealer.
///
/// When the task executor is `undefined` ths task will be scheduled on the
/// When the task executor is `undefined` the task will be scheduled on the
/// default global executor.
void scheduleActorProcessJob(JobPriority priority, TaskExecutorRef taskExecutor);

Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/Concurrency/CheckedContinuation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ extension CheckedContinuation {
/// indefinitely which will result in the task "hanging" as well as being leaked with
/// no possibility to destroy it.
///
/// The checked continuation offers detection of mis-use, and dropping the last reference
/// The checked continuation offers detection of misuse, and dropping the last reference
/// to it, without having resumed it will trigger a warning. Resuming a continuation twice
/// is also diagnosed and will cause a crash.
///
Expand Down Expand Up @@ -328,7 +328,7 @@ internal func __abi_withCheckedContinuation<T>(
/// indefinitely which will result in the task "hanging" as well as being leaked with
/// no possibility to destroy it.
///
/// The checked continuation offers detection of mis-use, and dropping the last reference
/// The checked continuation offers detection of misuse, and dropping the last reference
/// to it, without having resumed it will trigger a warning. Resuming a continuation twice
/// is also diagnosed and will cause a crash.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ extension _UnsafeMutableWrappedBuffer {
// Note: Array._copyContents traps when not given enough space, so we
// need to check if we have enough contiguous space available above.
//
// FIXME: Add suppport for segmented (a.k.a. piecewise contiguous)
// FIXME: Add support for segmented (a.k.a. piecewise contiguous)
// collections to the stdlib.
var (it, copied) = elements._copyContents(initializing: first)
if copied == first.count, let second = second {
Expand Down
12 changes: 6 additions & 6 deletions stdlib/public/Concurrency/TaskGroup+TaskExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ extension TaskGroup {
///
/// - Parameters:
/// - taskExecutor: The task executor that the child task should be started on and keep using.
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
/// will be ignored. In order to inherit the parent task's executor preference
/// invoke `addTaskUnlessCancelled()` without passing a value to the `taskExecutor` parameter,
/// and it will be inherited automatically.
Expand Down Expand Up @@ -135,7 +135,7 @@ extension ThrowingTaskGroup {
///
/// - Parameters:
/// - taskExecutor: The task executor that the child task should be started on and keep using.
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
/// will be ignored. In order to inherit the parent task's executor preference
/// invoke `addTask()` without passing a value to the `taskExecutor` parameter,
/// and it will be inherited automatically.
Expand Down Expand Up @@ -245,7 +245,7 @@ extension DiscardingTaskGroup {
///
/// - Parameters:
/// - taskExecutor: The task executor that the child task should be started on and keep using.
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
/// will be ignored. In order to inherit the parent task's executor preference
/// invoke `addTask()` without passing a value to the `taskExecutor` parameter,
/// and it will be inherited automatically.
Expand Down Expand Up @@ -295,7 +295,7 @@ extension DiscardingTaskGroup {
///
/// - Parameters:
/// - taskExecutor: The task executor that the child task should be started on and keep using.
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
/// will be ignored. In order to inherit the parent task's executor preference
/// invoke `addTask()` without passing a value to the `taskExecutor` parameter,
/// and it will be inherited automatically.
Expand Down Expand Up @@ -360,7 +360,7 @@ extension ThrowingDiscardingTaskGroup {
///
/// - Parameters:
/// - taskExecutor: The task executor that the child task should be started on and keep using.
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
/// will be ignored. In order to inherit the parent task's executor preference
/// invoke `addTask()` without passing a value to the `taskExecutor` parameter,
/// and it will be inherited automatically.
Expand Down Expand Up @@ -410,7 +410,7 @@ extension ThrowingDiscardingTaskGroup {
///
/// - Parameters:
/// - taskExecutor: The task executor that the child task should be started on and keep using.
/// If `nil` is passed explicitly, tht parent task's executor preference (if any),
/// If `nil` is passed explicitly, that parent task's executor preference (if any),
/// will be ignored. In order to inherit the parent task's executor preference
/// invoke `addTask()` without passing a value to the `taskExecutor` parameter,
/// and it will be inherited automatically.
Expand Down
12 changes: 6 additions & 6 deletions stdlib/public/Distributed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#===----------------------------------------------------------------------===#

if(SWIFT_BUILD_SDK_OVERLAY)
set(swift_distributed_darwin_depencencies Darwin)
set(swift_distributed_darwin_dependencies Darwin)
else()
set(swift_distributed_darwin_depencencies)
set(swift_distributed_darwin_dependencies)
endif()

set(swift_distributed_link_libraries
Expand All @@ -30,10 +30,10 @@ add_swift_target_library(swiftDistributed ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS
DistributedMetadata.swift
LocalTestingDistributedActorSystem.swift

SWIFT_MODULE_DEPENDS_IOS ${swift_distributed_darwin_depencencies}
SWIFT_MODULE_DEPENDS_OSX ${swift_distributed_darwin_depencencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_distributed_darwin_depencencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_distributed_darwin_depencencies}
SWIFT_MODULE_DEPENDS_IOS ${swift_distributed_darwin_dependencies}
SWIFT_MODULE_DEPENDS_OSX ${swift_distributed_darwin_dependencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_distributed_darwin_dependencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_distributed_darwin_dependencies}
SWIFT_MODULE_DEPENDS_ANDROID Android
SWIFT_MODULE_DEPENDS_LINUX Glibc
SWIFT_MODULE_DEPENDS_FREEBSD Glibc
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/Distributed/DistributedActor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ extension DistributedActor /*: implicitly Decodable */ where Self.ID: Decodable
/// on, in order to obtain the instance this initializer should return.
///
/// - Parameter decoder: used to decode the ``ID`` of this distributed actor.
/// - Throws: If the actor system value in `decoder.userInfo` is missing or mis-typed;
/// - Throws: If the actor system value in `decoder.userInfo` is missing or mistyped;
/// the `ID` fails to decode from the passed `decoder`;
// or if the ``DistributedActor/resolve(id:using:)`` method invoked by this initializer throws.
nonisolated public init(from decoder: Decoder) throws {
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/Platform/android.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// The module map for the Android NDK.
// A portion of the modules in this file are prefixed
// with an underscore, to discourage users from importing them from
// Swift directly, as these modules might be overriden by the C++ stdlib.
// Swift directly, as these modules might be overridden by the C++ stdlib.
// Instead, users should import 'Android' or another
// umbrella module that includes these headers.

Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/RemoteInspection/TypeRef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ class DemanglingForTypeRef
node->addChild(MemberId, Dem);
} else {
// Otherwise, build up a DependentAssociatedTR node with
// the member Identifer and protocol
// the member Identifier and protocol
auto AssocTy = Dem.createNode(Node::Kind::DependentAssociatedTypeRef);
AssocTy->addChild(MemberId, Dem);
auto Proto = Dem.demangleType(MangledProtocol);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ extension AtomicUpdateOrdering {
/// An acquiring update synchronizes with a releasing operation
/// whose value its reads. It ensures that the releasing and
/// acquiring threads agree that all subsequent variable accesses on
/// the acquring thread happen after the atomic operation itself.
/// the acquiring thread happen after the atomic operation itself.
///
/// This value corresponds to `std::memory_order_acquire` in C++.
@available(SwiftStdlib 6.0, *)
Expand Down
8 changes: 4 additions & 4 deletions stdlib/public/Synchronization/Mutex/LinuxImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import Glibc

extension Atomic where Value == UInt32 {
// This returns 'false' on success and 'true' on error. Check 'errno' for the
// specifc error value.
// specific error value.
internal borrowing func _futexLock() -> UInt32 {
_swift_stdlib_futex_lock(.init(_rawAddress))
}

// This returns 'false' on success and 'true' on error. Check 'errno' for the
// specifc error value.
// specific error value.
internal borrowing func _futexTryLock() -> UInt32 {
_swift_stdlib_futex_trylock(.init(_rawAddress))
}
Expand Down Expand Up @@ -189,7 +189,7 @@ extension _MutexHandle {
// ESRCH - "The thread ID in the futex word at uaddr does not exist."
default:
// TODO: Replace with a colder function / one that takes a StaticString
fatalError("Unknown error occured while attempting to acquire a Mutex")
fatalError("Unknown error occurred while attempting to acquire a Mutex")
}
}
}
Expand Down Expand Up @@ -359,7 +359,7 @@ extension _MutexHandle {
// space.)"
default:
// TODO: Replace with a colder function / one that takes a StaticString
fatalError("Unknown error occured while attempting to release a Mutex")
fatalError("Unknown error occurred while attempting to release a Mutex")
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/Synchronization/Mutex/Mutex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/// class Manager {
/// let cache = Mutex<[Key: Resource]>([:])
///
/// func saveResouce(_ resource: Resouce, as key: Key) {
/// func saveResource(_ resource: Resource, as key: Key) {
/// cache.withLock {
/// $0[key] = resource
/// }
Expand Down Expand Up @@ -57,7 +57,7 @@ extension Mutex: @unchecked Sendable where Value: ~Copyable {}

@available(SwiftStdlib 6.0, *)
extension Mutex where Value: ~Copyable {
/// Calls the given closure after acquring the lock and then releases
/// Calls the given closure after acquiring the lock and then releases
/// ownership.
///
/// This method is equivalent to the following sequence of code:
Expand Down
Loading