Skip to content

Commit 8f21af7

Browse files
committed
typo and spelling fixes
1 parent 58fbd1b commit 8f21af7

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

docs/ErrorHandling.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ Throwing an error
256256
-----------------
257257

258258
The ``throw`` statement begins the propagation of an error. It always
259-
take an argument, which can be any value that conforms to the
259+
takes an argument, which can be any value that conforms to the
260260
``ErrorType`` protocol (described below).
261261

262262
::
@@ -680,7 +680,7 @@ can be overloaded on whether its argument closure throws; the
680680
overload that takes a throwing closures would itself throw.
681681

682682
There is one minor usability problem here, though. If the closure
683-
contains throwing expressions, those expression must be explicitly
683+
contains throwing expressions, those expressions must be explicitly
684684
marked within the closure with ``try``. However, from the compiler's
685685
perspective, the call to ``autoreleasepool`` is also a call that
686686
can throw, and so it must also be marked with ``try``::

docs/ErrorHandlingRationale.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The most important dimensions of variation are:
2626
errors or not; such a language has **typed propagation**.
2727

2828
* Whether, in a language with typed propagation, the default rule is
29-
that that a function can produce an error or that it can't; this
29+
that a function can produce an error or that it can't; this
3030
is the language's **default propagation rule**.
3131

3232
* Whether, in a language with typed propagation, the language enforces
@@ -812,7 +812,7 @@ in a very unsafe way that does not behave well in the presence of
812812
inlining.
813813
814814
Overall, this approach requires a lot of work in the non-error path
815-
of functions with interesting frames. Given that we expects functions
815+
of functions with interesting frames. Given that we expect functions
816816
with interesting frames to be very common in Swift, this is not
817817
an implementation approach we would consider in the abstract. However,
818818
it is the implementation approach for C++/ObjC exceptions on iOS/ARM32,
@@ -955,7 +955,7 @@ This allows the defer action to be written near the code it
955955
"balances", allowing the reader to immediately see that the required
956956
clean-up will be done (but this has drawbacks, as discussed above).
957957
It's very compact, which is nice as most defer actions are short. It
958-
also allow multiple actions to pile up without adding awkward nesting.
958+
also allows multiple actions to pile up without adding awkward nesting.
959959
However, the function-exit semantics exacerbate the problem of
960960
searching for intervening clean-up actions, and they introduce
961961
semantic and performance problems with capturing the values of local
@@ -1396,7 +1396,7 @@ same glance. The keyword appears before the arrow for the simple
13961396
reason that the arrow is optional (along with the rest of the return
13971397
type) in function and initializer declarations; having the keyword
13981398
appear in slightly different places based on the presence of a return
1399-
type would be silly and would making adding a non-void return type
1399+
type would be silly and would make adding a non-void return type
14001400
feel awkward. The keyword itself should be descriptive, and it's
14011401
particularly nice for it to be a form of the verb used by the throwing
14021402
expression, conjugated as if performed by the function itself. Thus,

docs/archive/LangRef.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ <h4 id="attribute-inout"><tt>inout</tt> Attribute</h4>
786786
</p>
787787

788788
<p><tt>inout</tt> indicates that the argument will be passed as an "in-out"
789-
parameter. The caller must pass an lvalue decorated with the <tt>&</tt>
789+
parameter. The caller must pass an lvalue decorated with the <tt>&amp;</tt>
790790
prefix operator as the argument. Semantically, the value of the argument
791791
is passed "in" to the callee to a local value, and that local value is
792792
stored back "out" to the lvalue when the callee exits. This is normally
@@ -837,7 +837,7 @@ <h4 id="attribute-inout"><tt>inout</tt> Attribute</h4>
837837
</pre>
838838

839839
<p>The type being annotated must be <a href="#materializable">materializable</a>.
840-
The type after annotation is never materializable.</tt>
840+
The type after annotation is never materializable.
841841

842842
<p>FIXME: we probably need a const-like variant, which permits
843843
r-values (and avoids writeback when the l-value is not physical).

docs/proposals/Accessors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ summary of the rule being proposed.
10271027

10281028
If storage is passed to an ``inout`` argument, then any other
10291029
simultaneous attempt to read or write to that storage, including to
1030-
the storage containing it, will have have unspecified behavior. Reads
1030+
the storage containing it, will have unspecified behavior. Reads
10311031
from it may see partially-updated values, or even values which will
10321032
change as modifications are made to the original storage; and writes
10331033
may be clobbered or simply disappear.

docs/proposals/AttrC.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ On Darwin, we can allow passing reference counted pointers directly
6666
as function parameters. They are still not allowed as fields in ``@c``
6767
structs, though.
6868

69-
The convention for arguments and results an be the same as CoreFoundation
69+
The convention for arguments and results can be the same as CoreFoundation
7070
functions imported from C. The code in ``CFunctionConventions`` in
7171
SILFunctionType.cpp looks relevant.
7272

docs/proposals/Concurrency.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ variables and unsafe code. Objective-C methods are automatically marked as
202202
that do not explicitly mark the APIs as reentrant or non-reentrant.
203203

204204
In the example program below the method `fly` may access the global variable
205-
because it is marked with the attribute `unsafe`. The compile won't allow this
205+
because it is marked with the attribute `unsafe`. The compiler won't allow this
206206
method to be executed from a worker-thread.
207207

208208
.. code-block:: swift

docs/proposals/OptimizerEffects.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ generic arguments::
562562
func setElt(elt: T) { t = elt }
563563
}
564564

565-
With no knowledge of T.deinit() we must assume worst case. SIL effects
565+
With no knowledge of T.deinit() we must assume the worst case. SIL effects
566566
analysis following specialization can easily handle such a trivial
567567
example. But there are two situations to be concerned about:
568568

@@ -853,7 +853,7 @@ values, and (3) no calls are made into nonpure code.
853853
type definition, or it may rely on a type constraint.
854854

855855
(3) Naturally, any calls within the function body must be transitively
856-
pure. There is no need to check a calls to the storage
856+
pure. There is no need to check calls to the storage
857857
deinitializer, which should already be guaranteed pure by virtue
858858
of (2).
859859

0 commit comments

Comments
 (0)