Skip to content

Commit 089e1f3

Browse files
authored
Merge pull request #3277 from jhpratt/fix-typos
Fix typos
2 parents e68eb8f + 590ec4b commit 089e1f3

File tree

152 files changed

+291
-291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+291
-291
lines changed

compiler_changes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ submitted later if there is scope for large changes to the language RFC.
2828
* Adding, removing, or changing a stable compiler flag
2929
* The implementation of new language features where there is significant change
3030
or addition to the compiler. There is obviously some room for interpretation
31-
about what consitutes a "significant" change and how much detail the
31+
about what constitutes a "significant" change and how much detail the
3232
implementation RFC needs. For guidance, [associated items](text/0195-associated-items.md)
3333
and [UFCS](text/0132-ufcs.md) would clearly need an implementation RFC,
3434
[type ascription](text/0803-type-ascription.md) and
@@ -41,7 +41,7 @@ submitted later if there is scope for large changes to the language RFC.
4141

4242
* Bug fixes, improved error messages, etc.
4343
* Minor refactoring/tidying up
44-
* Implmenting language features which have an accepted RFC, where the
44+
* Implementing language features which have an accepted RFC, where the
4545
implementation does not significantly change the compiler or require
4646
significant new design work
4747
* Adding unstable API for tools (note that all compiler API is currently unstable)

libs_changes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ as `std` has become more conservative in favour of the much more agile cargovers
7676
* Too marginal for std
7777
* Significant implementation problems
7878

79-
* A PR may also be closed because an RFC is approriate.
79+
* A PR may also be closed because an RFC is appropriate.
8080

8181
* A (non-RFC) PR may be **merged as unstable**. In this case, the feature
8282
should have a fresh feature gate and an associated tracking issue for

style-guide/expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ Examples:
643643
```rust
644644
match foo {
645645
foo => bar,
646-
a_very_long_patten | another_pattern if an_expression() => {
646+
a_very_long_pattern | another_pattern if an_expression() => {
647647
no_room_for_this_expression()
648648
}
649649
foo => {

text/0019-opt-in-builtin-traits.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ opt-in. There are two main reasons for my concern:
7171

7272
To elaborate on those two points: With respect to parallelization: for
7373
the most part, Rust types are threadsafe "by default". To make
74-
something non-threadsafe, you must employ unsychronized interior
75-
mutability (e.g., `Cell`, `RefCell`) or unsychronized shared ownership
74+
something non-threadsafe, you must employ unsynchronized interior
75+
mutability (e.g., `Cell`, `RefCell`) or unsynchronized shared ownership
7676
(`Rc`). In both cases, there are also synchronized variants available
7777
(`Mutex`, `Arc`, etc). This implies that we can make APIs to enable
7878
intra-task parallelism and they will work ubiquitously, so long as
@@ -116,7 +116,7 @@ All three of these (`Snapshot`, `NoManaged`, `NoDrop`) can be easily
116116
defined using traits with default impls.
117117

118118
A final, somewhat weaker, motivator is aesthetics. Ownership has allowed
119-
us to move threading almost entirely into libaries. The one exception
119+
us to move threading almost entirely into libraries. The one exception
120120
is that the `Send` and `Share` types remain built-in. Opt-in traits
121121
makes them *less* built-in, but still requires custom logic in the
122122
"impl matching" code as well as special safety checks when

text/0040-libstd-facade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ algorithms apart from the default sorting algorithm.
164164
#### FromStr
165165

166166
This trait and module are left out because strings are left out. All types in
167-
libmini can have their implemention of FromStr in the crate which implements
167+
libmini can have their implementation of FromStr in the crate which implements
168168
strings
169169

170170
#### Floats

text/0048-traits.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ Note that there is some interaction with the distinction between input
231231
and output type parameters discussed in the previous
232232
example. Specifically, we must never *infer* the value of the `Self`
233233
type parameter based on the impls in scope. This is because it would
234-
cause *crate concatentation* to potentially lead to compilation errors
234+
cause *crate concatenation* to potentially lead to compilation errors
235235
in the form of inference failure.
236236

237237
## Properties
@@ -242,7 +242,7 @@ There are important properties I would like to guarantee:
242242
values for all of its type parameters, there should always be at
243243
most one applicable impl. This should remain true even when unknown,
244244
additional crates are loaded.
245-
- **Crate concatentation:** It should always be possible to take two
245+
- **Crate concatenation:** It should always be possible to take two
246246
creates and combine them without causing compilation errors. This
247247
property
248248

text/0155-anonymous-impl-only-in-same-module.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ and methods of a struct should be defined nearby.
101101
I propose three changes to the language:
102102

103103
- `impl` on multiple-ident paths such as `impl mymod::MyStruct` is disallowed.
104-
Since this currently suprises the user by having absolutely no effect for
104+
Since this currently surprises the user by having absolutely no effect for
105105
static methods, support for this is already broken.
106106
- `impl MyStruct` must occur in the same module that `MyStruct` is defined.
107107
This is to prevent the above problems with `impl`-across-modules.

text/0169-use-path-as-id.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Summary
66

77
Change the rebinding syntax from `use ID = PATH` to `use PATH as ID`,
8-
so that paths all line up on the left side, and imported identifers
8+
so that paths all line up on the left side, and imported identifiers
99
are all on the right side. Also modify `extern crate` syntax
1010
analogously, for consistency.
1111

text/0194-cfg-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ proposed names read better with the function-like syntax and are consistent
8585
with `Iterator::all` and `Iterator::any`.
8686

8787
Issue [#2119](https://github.com/rust-lang/rust/issues/2119) proposed the
88-
addition of `||` and `&&` operators and parantheses to the attribute syntax
88+
addition of `||` and `&&` operators and parentheses to the attribute syntax
8989
to result in something like `#[cfg(a || (b && c)]`. I don't favor this proposal
9090
since it would result in a major change to the attribute syntax for relatively
9191
little readability gain.

text/0195-associated-items.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ impl<'a, T> Sliceable for &'a Vec<T> {
12631263
But then there's a difficult question:
12641264

12651265
```
1266-
fn dice<A>(a: &A) -> &A::Slice where &A: Slicable {
1266+
fn dice<A>(a: &A) -> &A::Slice where &A: Sliceable {
12671267
a // is this allowed?
12681268
}
12691269
```

text/0218-empty-struct-with-braces.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ completed, one can then take the next step of adding the actual field.
9898
# Drawbacks
9999

100100
Some people like "There is only one way to do it." But, there is
101-
precendent in Rust for violating "one way to do it" in favor of
101+
precedent in Rust for violating "one way to do it" in favor of
102102
syntactic convenience or regularity; see
103103
the [Precedent for flexible syntax in Rust] appendix.
104104
Also, see the [Always Require Braces] alternative below.
@@ -311,7 +311,7 @@ adoption of [Rust RFC 25].
311311

312312
## Precedent for flexible syntax in Rust
313313

314-
There is precendent in Rust for violating "one way to do it" in favor
314+
There is precedent in Rust for violating "one way to do it" in favor
315315
of syntactic convenience or regularity.
316316

317317
For example, one can often include an optional trailing comma, for
@@ -358,7 +358,7 @@ is not a democracy, the number of commenters should not matter anyway.)
358358
* "Frequently start out with an empty struct and add fields as I need them." ==> Favors: This RFC or Always Require Braces
359359
* "Foo{} suggests is constructing something that it's not; all uses of the value `Foo` are indistinguishable from each other" ==> Favors: Status Quo
360360
* "I find it strange anyone would prefer `let x = Foo{};` over `let x = Foo;`" ==> Favors Status Quo; strongly opposes Always Require Braces.
361-
* "I agree that 'instantiation-should-follow-declation', that is, structs declared `;, (), {}` should only be instantiated [via] `;, (), { }` respectively" ==> Opposes leniency of this RFC in that it allows expression to use include or omit `{}` on an empty struct, regardless of declaration form, and vice-versa.
361+
* "I agree that 'instantiation-should-follow-declaration', that is, structs declared `;, (), {}` should only be instantiated [via] `;, (), { }` respectively" ==> Opposes leniency of this RFC in that it allows expression to use include or omit `{}` on an empty struct, regardless of declaration form, and vice-versa.
362362
* "The code generation argument is reasonable, but I wouldn't want to force noisier syntax on all 'normal' code just to make macros work better." ==> Favors: This RFC
363363

364364
[Always Require Braces]: #always-require-braces

text/0403-cargo-build-command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ directly. Additionally, packages using `*-sys` packages should not declare a
394394
## Phasing strategy
395395

396396
The modifications to the `build` command are breaking changes to Cargo. To ease
397-
the transition, the build comand will be join'd to the root path of a crate, and
397+
the transition, the build command will be join'd to the root path of a crate, and
398398
if the file exists and ends with `.rs`, it will be compiled as describe above.
399399
Otherwise a warning will be printed and the fallback behavior will be
400400
executed.

text/0517-io-os-reform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ Windows, it can be considered an optimization for `flush` and on
14701470
Windows behave identically to `sync_all`, just as it does on some Unix
14711471
filesystems.)
14721472

1473-
The `path` method wil remain `#[unstable]`, as we do not yet want to
1473+
The `path` method will remain `#[unstable]`, as we do not yet want to
14741474
commit to its API.
14751475

14761476
The `open_mode` function will be removed in favor of and will take an

text/0546-Self-not-sized-by-default.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ implemented):
3939
trait Foo for ?Sized { ... }
4040
```
4141

42-
This syntax doesn't have any other precendent in the language. One
42+
This syntax doesn't have any other precedent in the language. One
4343
might expect to write:
4444

4545
```rust

text/0550-macro-future-proofing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ possible to lift these restrictions backwards compatibly if desired.
1212

1313
# Key Terminology
1414

15-
- `macro`: anything invokable as `foo!(...)` in source code.
15+
- `macro`: anything invocable as `foo!(...)` in source code.
1616
- `MBE`: macro-by-example, a macro defined by `macro_rules`.
1717
- `matcher`: the left-hand-side of a rule in a `macro_rules` invocation, or a subportion thereof.
1818
- `macro parser`: the bit of code in the Rust parser that will parse the input using a grammar derived from all of the matchers.
@@ -45,7 +45,7 @@ and `$foo` and `$i` are simple NT's with `expr` and `ident` as their
4545
respective fragment specifiers.
4646

4747
`$(i:ident),*` is *also* an NT; it is a complex NT that matches a
48-
comma-seprated repetition of identifiers. The `,` is the separator
48+
comma-separated repetition of identifiers. The `,` is the separator
4949
token for the complex NT; it occurs in between each pair of elements
5050
(if any) of the matched fragment.
5151

@@ -329,7 +329,7 @@ accordingly.
329329

330330
Below are some examples of FIRST and LAST.
331331
(Note in particular how the special ε element is introduced and
332-
eliminated based on the interation between the pieces of the input.)
332+
eliminated based on the interaction between the pieces of the input.)
333333

334334
Our first example is presented in a tree structure to elaborate on how
335335
the analysis of the matcher composes. (Some of the simpler subtrees

text/0599-default-object-bound.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ source today, but this has not been fully verified.)
147147

148148
# Detailed design
149149

150-
This section extends the high-level rule above with suppor for
150+
This section extends the high-level rule above with support for
151151
user-defined types, and also describes potential interactions with
152152
other parts of the system.
153153

@@ -243,7 +243,7 @@ the expansion of `Box<SomeTrait>` would be different.
243243

244244
**Interaction with object coercion.** The rules specify that `&'a
245245
SomeTrait` and `&'a mut SomeTrait` are expanded to `&'a
246-
(SomeTrait+'a)`and `&'a mut (SomeTrait+'a)` respecively. Today, in fn
246+
(SomeTrait+'a)`and `&'a mut (SomeTrait+'a)` respectively. Today, in fn
247247
signatures, one would get the expansions `&'a (SomeTrait+'b)` and `&'a
248248
mut (SomeTrait+'b)`, respectively. In the case of a shared reference
249249
`&'a SomeTrait`, this difference is basically irrelevant, as the

text/0639-discriminant-intrinsic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Note the returned values for two differently-typed variants may compare in any w
9393
simply treat them as single-variant enums and synthesise a zero constant. Note that this is what
9494
would be done for single-variant enums anyway.
9595

96-
* Do nothing. Improvements to codegen and/or optimisation could make this uneccessary. The
96+
* Do nothing. Improvements to codegen and/or optimisation could make this unnecessary. The
9797
"Sufficiently Smart Compiler" trap is a strong case against this reasoning though. There will
9898
likely always be cases where the user can write more efficient code than the compiler can produce.
9999

@@ -329,7 +329,7 @@ pub enum SqlState {
329329
FdwReplyHandle,
330330
FdwSchemaNotFound,
331331
FdwTableNotFound,
332-
FdwUnableToCreateExcecution,
332+
FdwUnableToCreateExecution,
333333
FdwUnableToCreateReply,
334334
FdwUnableToEstablishConnection,
335335
PlpgsqlError,

text/0738-variance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Here the `Context` struct has one lifetime parameter, `data`, that
8686
represents the lifetime of some data that it references. Now let's
8787
imagine that the lifetime of the data is some lifetime we call
8888
`'x`. If we have a context `cx` of type `Context<'x>`, it is ok to
89-
(for example) pass `cx` as an argment where a value of type
89+
(for example) pass `cx` as an argument where a value of type
9090
`Context<'y>` is required, so long as `'x : 'y` ("`'x` outlives
9191
`'y`"). That is, it is ok to approximate `'x` as a shorter lifetime
9292
like `'y`. This makes sense because by changing `'x` to `'y`, we're
@@ -199,7 +199,7 @@ used in the body of the type. This generally occurs with unsafe code:
199199

200200
Since these parameters are unused, the inference can reasonably
201201
conclude that `AtomicPtr<int>` and `AtomicPtr<uint>` are
202-
interchangable: after all, there are no fields of type `T`, so what
202+
interchangeable: after all, there are no fields of type `T`, so what
203203
difference does it make what value it has? This is not good (and in
204204
fact we have behavior like this today for lifetimes, which is a common
205205
source of error).

text/0769-sound-generic-drop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# History
66

7-
2015.09.18 -- This RFC was partially superceded by [RFC 1238], which
7+
2015.09.18 -- This RFC was partially superseded by [RFC 1238], which
88
removed the parametricity-based reasoning in favor of an attribute.
99

1010
[RFC 1238]: https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md

text/0953-op-assign.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Implement these traits for the primitive numeric types *without* overloading,
4242
i.e. only `impl AddAssign<i32> for i32 { .. }`.
4343

4444
Add an `op_assign` feature gate. When the feature gate is enabled, the compiler
45-
will consider these traits when typecheking `a += b`. Without the feature gate
45+
will consider these traits when typechecking `a += b`. Without the feature gate
4646
the compiler will enforce that `a` and `b` must be primitives of the same
4747
type/category as it does today.
4848

text/0980-read-exact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The following method is added to the `Read` trait:
5656
fn read_exact(&mut self, buf: &mut [u8]) -> Result<()>;
5757
```
5858

59-
Aditionally, a default implementation of this method is provided:
59+
Additionally, a default implementation of this method is provided:
6060

6161
``` rust
6262
fn read_exact(&mut self, mut buf: &mut [u8]) -> Result<()> {

text/1014-stdout-existential-crisis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Update the methods `std::io::stdin` `std::io::stdout` and `std::io::stderr` as f
2424

2525
# Drawbacks
2626

27-
* Hides an error from the user which we may want to expose and may lead to people missing panicks occuring in threads.
27+
* Hides an error from the user which we may want to expose and may lead to people missing panicks occurring in threads.
2828
* Some languages, such as Ruby and Python, do throw an exception when stdout is missing.
2929

3030
# Alternatives

text/1023-rebalancing-coherence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ operator, it seems reasonable to say that implementing a `Fn` trait is
184184
itself a breaking change. (This is not to suggest that there is
185185
something *fundamental* about the `Fn` traits that distinguish them
186186
from all other traits; just that if the goal is to have rules that
187-
users can easily remember, saying that implememting a core operator
187+
users can easily remember, saying that implementing a core operator
188188
trait is a breaking change may be a reasonable rule, and it enables
189189
useful patterns to boot -- patterns that are baked into the libstd
190190
APIs.)

text/1048-rename-soft-link-to-symlink.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Unix. It is a classic compromise, that makes everyone unhappy.
143143

144144
`sym_link` is slightly more consistent with the complementary `hard_link`
145145
function, and treating "sym link" as two separate words has some precedent in
146-
two of the Windows-targetted APIs, Delphi and some of the PowerShell cmdlets
146+
two of the Windows-targeted APIs, Delphi and some of the PowerShell cmdlets
147147
observed. However, I have not found any other snake case API that uses that,
148148
and only a couple of Windows-specific APIs that use it in camel case; most
149149
usage prefers the single word "symlink" to the two word "sym link" as the

text/1122-language-semver.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ are generally considered underspecified.
129129
We expect that there will be cases that fall on a grey line between
130130
bug and expected behavior, and discussion will be needed to determine
131131
where it falls. The recent conflict between `Rc` and scoped threads is
132-
an example of such a discusison: it was clear that both APIs could not
132+
an example of such a discussion: it was clear that both APIs could not
133133
be legal, but not clear which one was at fault. The results of these
134134
discussions will feed into the Rust spec as it is developed.
135135

@@ -183,7 +183,7 @@ Known areas where change is expected include the following:
183183
- We plan to stop zeroing data and instead use marker flags on the stack,
184184
as specified in [RFC 320]. This may affect destructors that rely on ovewriting
185185
memory or using the `unsafe_no_drop_flag` attribute.
186-
- Currently, panicing in a destructor can cause unintentional memory
186+
- Currently, panicking in a destructor can cause unintentional memory
187187
leaks and other poor behavior (see [#14875], [#16135]). We are
188188
likely to make panic in a destructor simply abort, but the precise
189189
mechanism is not yet decided.
@@ -281,7 +281,7 @@ the change still breaks a large body of code we do not have access to.
281281

282282
**What attribute should we use to "opt out" of soundness changes?**
283283
The section on breaking changes indicated that it may sometimes be
284-
appropriate to includ an "opt out" that people can use to temporarily
284+
appropriate to include an "opt out" that people can use to temporarily
285285
revert to older, unsound type rules, but did not specify precisely
286286
what that opt-out should look like. Ideally, we would identify a
287287
specific attribute in advance that will be used for such purposes. In

text/1131-likely-intrinsic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
# Summary
77

8-
Provide a pair of intrinsic functions for hinting the likelyhood of branches being taken.
8+
Provide a pair of intrinsic functions for hinting the likelihood of branches being taken.
99

1010
# Motivation
1111

1212
Branch prediction can have significant effects on the running time of some code. Especially tight
1313
inner loops which may be run millions of times. While in general programmers aren't able to
14-
effectively provide hints to the compiler, there are cases where the likelyhood of some branch
14+
effectively provide hints to the compiler, there are cases where the likelihood of some branch
1515
being taken can be known.
1616

1717
For example: in arbitrary-precision arithmetic, operations are often performed in a base that is

text/1156-adjust-default-object-bounds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ The rules for user-defined types from RFC 599 are altered as follows
136136

137137
This is a breaking change, and hence it behooves us to evaluate the
138138
impact and describe a procedure for making the change as painless as
139-
possible. One nice propery of this change is that it only affects
139+
possible. One nice property of this change is that it only affects
140140
*defaults*, which means that it is always possible to write code that
141141
compiles both before and after the change by avoiding defaults in
142142
those cases where the new and old compiler disagree.

text/1183-swap-out-jemalloc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ the allocator.
3131
In addition to using an entirely separate allocator altogether, some Rust
3232
programs may want to simply instrument allocations or shim in additional
3333
functionality (such as memory tracking statistics). This is currently quite
34-
difficult to do, and would be accomodated with a custom allocation scheme.
34+
difficult to do, and would be accommodated with a custom allocation scheme.
3535

3636
# Detailed design
3737

3838
The high level design can be found [in this gist][gist], but this RFC intends to
3939
expound on the idea to make it more concrete in terms of what the compiler
40-
implementation will look like. A [sample implementaiton][impl] is available of
40+
implementation will look like. A [sample implementation][impl] is available of
4141
this section.
4242

4343
[gist]: https://gist.github.com/alexcrichton/41c6aad500e56f49abda

0 commit comments

Comments
 (0)