Skip to content

Commit 6bdce2f

Browse files
committed
Fix typos in RFCs 2251-2500
1 parent 9552ca8 commit 6bdce2f

18 files changed

+32
-32
lines changed

text/2296-option-replace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This RFC proposes the addition of `Option::replace` to complete the `Option::tak
1313

1414
You can see the `Option` as a container and other containers already have this kind of method to change a value in-place like the [HashMap::replace](https://doc.rust-lang.org/std/collections/struct.HashSet.html#method.replace) method.
1515

16-
How do you replace a value inside an `Option`, you can use `mem::replace` but it can be really unconvenient to import the `mem` module just for that. Why not adding a useful method to do that ?
16+
How do you replace a value inside an `Option`, you can use `mem::replace` but it can be really inconvenient to import the `mem` module just for that. Why not adding a useful method to do that ?
1717

1818
This is the symmetry of the already present `Option::take` method.
1919

text/2298-macro-at-most-once-rep.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The pattern portion is composed of zero or more subpatterns concatenated togethe
9090
```rust
9191
macro_rules! println {
9292
// Takes a variable number of arguments after the template
93-
($tempate:expr, $($args:expr),*) => { ... }
93+
($template:expr, $($args:expr),*) => { ... }
9494
}
9595
```
9696
which can be invoked like so:
@@ -103,7 +103,7 @@ println!("", foo, bar) // 2 args
103103

104104
The `*` in the pattern of this example indicates "0 or more repetitions". One can also use `+` for "at _least_ one repetition" or `?` for "at _most_ one repetition".
105105

106-
In the body of a rule, one can specify to repeat some code for every occurence of the pattern in the invokation:
106+
In the body of a rule, one can specify to repeat some code for every occurrence of the pattern in the invocation:
107107

108108
```rust
109109
macro_rules! foo {

text/2306-convert-id.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ With `identity`, this intent becomes clearer.
8484

8585
The `drop` function in `core::mem` is defined as `pub fn drop<T>(_x: T) { }`.
8686
The same effect can be achieved by writing `{ _x; }`. This presents us
87-
with a precendent that such trivial functions are considered useful and
87+
with a precedent that such trivial functions are considered useful and
8888
includable inside the standard library even though they can be written easily
8989
inside a user's crate.
9090

text/2307-concrete-nonzero-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ With `NonNull` covering pointers, the remaining use cases for `NonZero` are inte
6262
One problem of the current API is that
6363
it is unclear what happens or what *should* happen to `NonZero<T>` or `Option<NonZero<T>>`
6464
when `T` is some type other than a raw pointer or a primitive integer.
65-
In particular, crates outside of `std` can implement `Zeroable` for their abitrary types
65+
In particular, crates outside of `std` can implement `Zeroable` for their arbitrary types
6666
since it is a public trait.
6767

6868
To avoid this question entirely,
@@ -77,7 +77,7 @@ When an integer value can never be zero because of the way an algorithm works,
7777
this fact can be encoded in the type system
7878
by using for example the `NonZeroU32` type instead of `u32`.
7979

80-
This enables code recieving such a value to safely make some assuptions,
80+
This enables code receiving such a value to safely make some assumptions,
8181
for example that dividing by this value will not cause a `attempt to divide by zero` panic.
8282
This may also enable the compiler to make some memory optimizations,
8383
for example `Option<NonZeroU32>` might take no more space than `u32`
@@ -182,7 +182,7 @@ This adds to the ever-expanding API surface of the standard library.
182182
(Stable APIs that mention traits like `RangeArgument` that are not stable *yet*
183183
but have a path to stabilization are less of an abuse.)
184184

185-
* Still, we could decide on some answer to “`Zeroable` for abitrary types”,
185+
* Still, we could decide on some answer to “`Zeroable` for arbitrary types”,
186186
implement and test it, stabilize `NonZero<T>` and `Zeroable` as-is
187187
(re-exported in `std`), and not add `num::NonZero*`.
188188

text/2314-roadmap-2018.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Finally, there are several highly-awaited features that are **unlikely to ship**
123123
#### Compiler
124124

125125

126-
> [Give me non-embarassing compilation speed!](https://matthewkmayer.github.io/blag/public/post/rust-2018/) (@matthewkmayer)
126+
> [Give me non-embarrassing compilation speed!](https://matthewkmayer.github.io/blag/public/post/rust-2018/) (@matthewkmayer)
127127
128128
Compiler work will center on:
129129

text/2325-stable-simd.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,10 @@ on x86 platforms:
449449
Infrastructure-wise the contents of `std::arch` are expected to continue to be
450450
defined in the [`stdsimd` crate/repository][stdsimd]. Intrinsics defined here go
451451
through a rigorous test suite involving automatic verification against the
452-
upstream architecture defintion, verification that the correct instruction is
452+
upstream architecture definition, verification that the correct instruction is
453453
generated by LLVM, and at least one runtime test for each intrinsic to ensure it
454454
not only compiles but also produces correct results. It's expected that
455-
stabilized intrinsics will meet these critera to the best of their ability.
455+
stabilized intrinsics will meet these criteria to the best of their ability.
456456

457457
Currently today on x86 and ARM platforms the stdsimd crate performs all these
458458
checks, but these checks are not yet implemented for PowerPC/MIPS/etc, but
@@ -579,7 +579,7 @@ desire to stabilize MMX intrinsics, the `__m64` and all related intrinsics
579579
This RFC represents a *significant* addition to the standard library, maybe one
580580
of the largest we've ever done! As a result alternate implementations of Rust
581581
will likely have a difficult time catching up to rustc/LLVM with all the SIMD
582-
intrinsics. Additionaly the semantics of "packed SIMD types should work
582+
intrinsics. Additionally the semantics of "packed SIMD types should work
583583
everywhere" may be overly difficult to implement in alternate implementations.
584584
It is worth noting that both [Cranelift][cranelift] and GCC support packed SIMD
585585
types.
@@ -713,7 +713,7 @@ being.
713713

714714
Despite the CI infrastructure of the `stdsimd` crate it seems inevitable that
715715
we'll get an intrinsic wrong at some point. What do we do in a situation like
716-
that? This situation is somewhat analagous to the `libc` crate but there you can
716+
that? This situation is somewhat analogous to the `libc` crate but there you can
717717
fix the problem downstream (just have a corrected type/definition) for
718718
vendor intrinsics it's not so easy.
719719

text/2333-prior-art.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ this was a bad idea, we can always revert back to the way it was before.
132132

133133
Finally, a longer template risks making it harder to contribute to the
134134
RFC process as an author as you are expected to fill in more sections.
135-
Some people who don't know a lot of other langauges may be intimidated into
136-
thinking that they are expected to know a wide variety of langauges and that
135+
Some people who don't know a lot of other languages may be intimidated into
136+
thinking that they are expected to know a wide variety of languages and that
137137
their contribution is not welcome otherwise. This drawback can be mitigated
138138
by more clearly communicating that the RFC process is a collaborative effort.
139139
If an author does not have prior art to offer up right away, other participants

text/2351-is-sorted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ too.
210210

211211

212212
### Add the three methods to additional data structures (like `LinkedList`) as well
213-
Adding these methods to every data structure in the standard libary is a lot of
213+
Adding these methods to every data structure in the standard library is a lot of
214214
duplicate code. Optimally, we would have a trait that represents sequential
215215
data structures and would only add `is_sorted` and friends to said trait. We
216216
don't have such a trait as of now; so `Iterator` is the next best thing. Slices

text/2383-lint-reasons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This supports the use cases of projects, teams, or organizations using specific
5050
sets of code style guidelines beyond the Rust defaults. This also enables the
5151
creation and maintenance of documented practices and preferences that can be
5252
standardized in a useful way. Furthermore, this provides a standardized means of
53-
explaining decisions when a style gude must be violated by attaching an
53+
explaining decisions when a style guide must be violated by attaching an
5454
overriding lint attribute to a specific item.
5555

5656
- What is the expected outcome?

text/2388-try-expr.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ any exceptions in the `try { .. }` block.
295295
296296
An alternative would be to simply use the `do catch { ... }` syntax we have
297297
in the nightly compiler. However, this syntax was not in the accepted `catch`
298-
RFC and was only a temporarly fix around `catch { .. }` not working.
298+
RFC and was only a temporary fix around `catch { .. }` not working.
299299
300300
## Alternative: `do try { .. }`
301301
@@ -488,10 +488,10 @@ problematic as it:
488488

489489
Arguably, this candidate keyword is a somewhat a good choice.
490490

491-
To `trap` an error is sufficently clear on the "exception boundary" semantics
491+
To `trap` an error is sufficiently clear on the "exception boundary" semantics
492492
we wish to communicate.
493493

494-
However, `trap` is used as an error handler in at least one langauge.
494+
However, `trap` is used as an error handler in at least one language.
495495

496496
It also does not have the familiarity that `try` does have and is entirely
497497
inconsistent wrt. naming in the standard library.
@@ -907,7 +907,7 @@ part and not for the handler, these languages are:
907907
+ [Erlang](http://erlang.org/doc/reference_manual/expressions.html#catch)
908908
+ [Tcl](https://www.tcl.tk/man/tcl/TclCmd/catch.htm)
909909

910-
However, the combined popularity of these langauges are not significant as
910+
However, the combined popularity of these languages are not significant as
911911
compared to that for `try { .. }`.
912912

913913
# Unresolved questions

0 commit comments

Comments
 (0)