Skip to content

Commit 4689a22

Browse files
Replace left/right quotation marks with apostrophes in non-quote contexts
* LEFT SINGLE QUOTATION MARK (U+2018) → APOSTROPHE (U+0027) * RIGHT SINGLE QUOTATION MARK (U+2019) → APOSTROPHE (U+0027)
1 parent 3f19714 commit 4689a22

File tree

10 files changed

+27
-27
lines changed

10 files changed

+27
-27
lines changed

docs/ARCOptimization.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ lower directly to is_unique instructions in SIL.
137137
The is_unique instruction takes the address of a reference, and
138138
although it does not actually change the reference, the reference must
139139
appear mutable to the optimizer. This forces the optimizer to preserve
140-
a retain distinct from whats required to maintain lifetime for any of
140+
a retain distinct from what's required to maintain lifetime for any of
141141
the reference's source-level copies, because the called function is
142142
allowed to replace the reference, thereby releasing the
143143
referent. Consider the following sequence of rules:
@@ -225,7 +225,7 @@ these cases:
225225
- isUniqueOrPinned_native : <T> (inout T[?]) -> Int1
226226

227227
These builtins perform an implicit cast to NativeObject before
228-
checking uniqueness. Theres no way at SIL level to cast the address
228+
checking uniqueness. There's no way at SIL level to cast the address
229229
of a reference, so we need to encapsulate this operation as part of
230230
the builtin.
231231

docs/MutationModel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Consider::
4040
w.title += " (parenthesized remark)”
4141

4242
What do we do with this? Since ``+=`` has an ``inout`` first
43-
argument, we detect this situation statically (hopefully one day well
43+
argument, we detect this situation statically (hopefully one day we'll
4444
have a better error message):
4545

4646
::
@@ -53,7 +53,7 @@ Great. Now what about this? [#append]_ ::
5353

5454
w.title.append(" (fool the compiler)")
5555

56-
Today, we allow it, but since theres no way to implement the
56+
Today, we allow it, but since there's no way to implement the
5757
write-back onto ``w.title``, the changes are silently dropped.
5858

5959
Unsatisfying Approaches

docs/OptimizationTips.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ do not have any overriding declarations in the same file:
157157
func usingE(e: E) {
158158
e.doSomething() // There is no sub class in the file that declares this class.
159159
// The compiler can remove virtual calls to doSomething()
160-
// and directly call As doSomething method.
160+
// and directly call A's doSomething method.
161161
}
162162

163163
func usingF(f: F) -> Int {

docs/proposals/InitializerInheritance.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ We can also distinguish two ways to originally invoke an initializer:
5050
Either kind of dispatched initialization poses a soundness problem
5151
because there may not be a sound initializer with any given signature
5252
in the most-derived class. In ObjC, initializers are normal instance
53-
methods and are therefore inherited like normal, but this isnt really
53+
methods and are therefore inherited like normal, but this isn't really
5454
quite right; initialization is different from a normal method in that
55-
its not inherently sensible to require subclasses to provide
55+
it's not inherently sensible to require subclasses to provide
5656
initializers at all the signatures that their superclasses provide.
5757

5858
Subobject initializers
5959
~~~~~~~~~~~~~~~~~~~~~~
6060
The defining class of a subobject initializer is central to its
6161
behavior. It can be soundly inherited by a class C only if is trivial
62-
to initialize the ivars of C, but its convenient to ignore that and
62+
to initialize the ivars of C, but it's convenient to ignore that and
6363
assume that subobjects will always trivially wrap and delegate to
6464
superclass subobject initializers.
6565

@@ -75,7 +75,7 @@ initializer of a class C if and only if it is defined by C.
7575

7676
Complete object initializers
7777
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78-
The defining class of a complete object initializer doesnt really
78+
The defining class of a complete object initializer doesn't really
7979
matter. In principle, complete object initializers could just as well
8080
be freestanding functions to which a metatype is passed. It can make
8181
sense to inherit a complete object initializer.
@@ -90,11 +90,11 @@ A complete object initializer soundly acts like a complete object
9090
initializer of a class C if and only if it delegates to an initializer
9191
which soundly acts like a complete object initializer of C.
9292

93-
These rules are not obvious to check statically because theyre
93+
These rules are not obvious to check statically because they're
9494
dependent on the dynamic value of the most-derived class C. Therefore
9595
any ability to check them depends on restricting C somehow relative to
9696
the defining class of the initializer. Since, statically, we only
97-
know the defining class of the initializer, we cant establish
97+
know the defining class of the initializer, we can't establish
9898
soundness solely at the definition site; instead we have to prevent
9999
unsound initializers from being called.
100100

@@ -116,7 +116,7 @@ Virtual initializers
116116
The above condition is not sufficient to make indirect initialization
117117
sound, because it relies on the ability to simply not use an
118118
initializer in cases where its delegation behavior isn't known to be
119-
sound, and we cant do that to arbitrary code. For that, we would
119+
sound, and we can't do that to arbitrary code. For that, we would
120120
need true virtual initializers.
121121

122122
A virtual initializer is a contract much more like that of a standard

docs/proposals/ValueSemantics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pseudo-random number generator). It needs to make one copy and do
175175
in-place mutation of the state, rather than wholesale value
176176
replacement via assignment, which might be expensive.
177177

178-
Heres a version of cycle_length that works when state is a mutable
178+
Here's a version of cycle_length that works when state is a mutable
179179
value type::
180180

181181
func cycle_length<State>(

include/swift/AST/Builtins.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ BUILTIN_SIL_OPERATION(FixLifetime, "fixLifetime", Special)
291291
///
292292
/// This builtin takes an inout object reference and returns a boolean. Passing
293293
/// the reference inout forces the optimizer to preserve a retain distinct from
294-
/// whats required to maintain lifetime for any of the reference's source-level
294+
/// what's required to maintain lifetime for any of the reference's source-level
295295
/// copies, because the called function is allowed to replace the reference,
296296
/// thereby releasing the referent.
297297
///

stdlib/public/SDK/Foundation/NSStringAPI.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ extension String {
134134
// + (const NSStringEncoding *)availableStringEncodings
135135

136136
/// Returns an Array of the encodings string objects support
137-
/// in the applications environment.
137+
/// in the application's environment.
138138
@warn_unused_result
139139
public static func availableStringEncodings() -> [NSStringEncoding] {
140140
var result = [NSStringEncoding]()
@@ -302,7 +302,7 @@ extension String {
302302

303303
/// Returns a string containing characters the `String` and a
304304
/// given string have in common, starting from the beginning of each
305-
/// up to the first characters that arent equivalent.
305+
/// up to the first characters that aren't equivalent.
306306
@warn_unused_result
307307
public func commonPrefixWithString(
308308
aString: String, options: NSStringCompareOptions) -> String {
@@ -452,15 +452,15 @@ extension String {
452452

453453
// @property NSString* decomposedStringWithCanonicalMapping;
454454

455-
/// Returns a string made by normalizing the `String`s
455+
/// Returns a string made by normalizing the `String`'s
456456
/// contents using Form D.
457457
public var decomposedStringWithCanonicalMapping: String {
458458
return _ns.decomposedStringWithCanonicalMapping
459459
}
460460

461461
// @property NSString* decomposedStringWithCompatibilityMapping;
462462

463-
/// Returns a string made by normalizing the `String`s
463+
/// Returns a string made by normalizing the `String`'s
464464
/// contents using Form KD.
465465
public var decomposedStringWithCompatibilityMapping: String {
466466
return _ns.decomposedStringWithCompatibilityMapping
@@ -605,7 +605,7 @@ extension String {
605605
/// - Parameter encoding: The encoding to use for the returned bytes.
606606
///
607607
/// - Parameter options: A mask to specify options to use for
608-
/// converting the receivers contents to `encoding` (if conversion
608+
/// converting the receiver's contents to `encoding` (if conversion
609609
/// is necessary).
610610
///
611611
/// - Parameter range: The range of characters in the receiver to get.
@@ -645,7 +645,7 @@ extension String {
645645
// maxLength:(NSUInteger)maxBufferCount
646646
// encoding:(NSStringEncoding)encoding
647647

648-
/// Converts the `String`s content to a given encoding and
648+
/// Converts the `String`'s content to a given encoding and
649649
/// stores them in a buffer.
650650
/// - Note: will store a maximum of `min(buffer.count, maxLength)` bytes.
651651
public func getCString(
@@ -923,7 +923,7 @@ extension String {
923923

924924
/// Returns a `String` object initialized by using a given
925925
/// format string as a template into which the remaining argument
926-
/// values are substituted according to the users default locale.
926+
/// values are substituted according to the user's default locale.
927927
public init(format: String, arguments: [CVarArgType]) {
928928
self = String(format: format, locale: nil, arguments: arguments)
929929
}
@@ -1120,23 +1120,23 @@ extension String {
11201120
// @property NSString* pathExtension;
11211121

11221122
/// Interprets the `String` as a path and returns the
1123-
/// `String`s extension, if any.
1123+
/// `String`'s extension, if any.
11241124
@available(*, unavailable, message="Use pathExtension on NSURL instead.")
11251125
public var pathExtension: String {
11261126
return _ns.pathExtension
11271127
}
11281128

11291129
// @property NSString* precomposedStringWithCanonicalMapping;
11301130

1131-
/// Returns a string made by normalizing the `String`s
1131+
/// Returns a string made by normalizing the `String`'s
11321132
/// contents using Form C.
11331133
public var precomposedStringWithCanonicalMapping: String {
11341134
return _ns.precomposedStringWithCanonicalMapping
11351135
}
11361136

11371137
// @property NSString * precomposedStringWithCompatibilityMapping;
11381138

1139-
/// Returns a string made by normalizing the `String`s
1139+
/// Returns a string made by normalizing the `String`'s
11401140
/// contents using Form KC.
11411141
public var precomposedStringWithCompatibilityMapping: String {
11421142
return _ns.precomposedStringWithCompatibilityMapping

stdlib/public/core/HashedCollections.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3398,7 +3398,7 @@ internal enum _Variant${Self}Storage<${TypeParametersDecl}> : _HashStorageType {
33983398
var nativeStorage = native
33993399

34003400
// FIXME(performance): if the storage is non-uniquely referenced, we
3401-
// shouldnt be copying the elements into new storage and then immediately
3401+
// shouldn't be copying the elements into new storage and then immediately
34023402
// deleting the elements. We should detect that the storage is not uniquely
34033403
// referenced and allocate new empty storage of appropriate capacity.
34043404

test/IDE/complete_lazy_initialized_var.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ func lazyInClass1(a: FooClass1) {
77
a.#^LAZY_IN_CLASS_1^#
88
}
99

10-
// This test checks that we dont include extra hidden declarations into code completion results. If you add more declarations to the type, update this test properly.
10+
// This test checks that we don't include extra hidden declarations into code completion results. If you add more declarations to the type, update this test properly.
1111
// LAZYVAR1: Begin completions, 1 items
1212
// LAZYVAR1-NEXT: Decl[InstanceVar]/CurrNominal: lazyVar1[#Int#]{{; name=.+$}}
1313
// LAZYVAR1-NEXT: End completions

utils/build-script-impl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,7 @@ function cmark_c_flags() {
12271227
}
12281228

12291229
function swift_c_flags() {
1230-
# Dont pass common_cross_c_flags to Swift because CMake code in the Swift
1230+
# Don't pass common_cross_c_flags to Swift because CMake code in the Swift
12311231
# project is itself aware of cross-compilation for the host tools and
12321232
# standard library.
12331233
echo -n "${COMMON_C_FLAGS}"

0 commit comments

Comments
 (0)