Skip to content

Commit ef664dd

Browse files
authored
Merge pull request #3238 from cuishuang/master
fix some typos
2 parents 8f77c52 + 4f7a8d8 commit ef664dd

15 files changed

+18
-18
lines changed

text/0048-traits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ wait till the end then we will have more type information available.
219219

220220
In my proposed solution, we eliminate the phase distinction. Instead,
221221
we simply track *pending constraints*. We are free to attempt to
222-
resolve pending constraints whenever desired. In paricular, whenever
222+
resolve pending constraints whenever desired. In particular, whenever
223223
we find we need more type information to proceed with some
224224
type-overloaded operation, rather than reporting an error we can try
225225
and resolve pending constraints. If that helps give more information,

text/0198-slice-notation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,6 @@ There are at least two downsides to doing so, however:
222222
* The idea of `Vec` as a smart pointer around a slice, and the use of `&*v` as
223223
above, is somewhat counterintuitive, especially for such a basic type.
224224

225-
Ultimately, notation for slicing seems desireable on its own merits anyway, and
225+
Ultimately, notation for slicing seems desirable on its own merits anyway, and
226226
if it can eliminate the need to implement `Deref` for `Vec` and `String`, all
227227
the better.

text/0213-defaulted-type-params.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ way (mechanical default outside of fn body, inference within).
555555
An alternative design is to use the `K=V` notation proposed in the
556556
associated items RFC for specify the values of default type
557557
parameters. However, this is somewhat odd, because default type
558-
parameters appear in a positional list, and thus it is suprising that
558+
parameters appear in a positional list, and thus it is surprising that
559559
values for the non-defaulted parameters are given positionally, but
560560
values for the defaulted type parameters are given with labels.
561561

text/0216-collection-views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ is when you're *not sure* if you need to insert, in which case you should be pre
123123
Otherwise, `find_mut` is likely sufficient.
124124

125125
The result is actually an enum, that will either be Occupied or Vacant. These two variants correspond
126-
to concrete types for when the key matched something in the map, and when the key didn't, repsectively.
126+
to concrete types for when the key matched something in the map, and when the key didn't, respectively.
127127

128128
If there isn't a match, the user has exactly one option: insert a value using `set`, which will also insert
129129
the guarantor, and destroy the Entry. This is to avoid the costs of maintaining the structure, which

text/0403-cargo-build-command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ would look like with respect to its set of C dependencies.
413413

414414
## Case study: generated code
415415

416-
As the release of Rust 1.0 comes closer, the use of complier plugins has become
416+
As the release of Rust 1.0 comes closer, the use of compiler plugins has become
417417
increasingly worrying over time. It is likely that plugins will not be available
418418
by default in the stable and beta release channels of Rust. Many core Cargo
419419
packages in the ecosystem today, such as gl-rs and iron, depend on plugins

text/0507-release-channels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ is added in addition to the existing `staged_stable` attribute, as
290290
well recording the version in which the deprecation was performed with
291291
the `since` parameter.
292292

293-
(Occassionally unstable APIs may be deprecated for the sake of easing
293+
(Occasionally unstable APIs may be deprecated for the sake of easing
294294
user transitions, in which case they receive both the `staged_stable`
295295
and `staged_deprecated` attributes at once.)
296296

text/0528-string-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ without a lifetime parameter by making use of higher kinded types in order to si
315315
string APIs. Eg, instead of `fn starts_with<'a, P>(&'a self, pat: P) -> bool where P: Pattern<'a>;`
316316
you'd have `fn starts_with<P>(&self, pat: P) -> bool where P: Pattern;`.
317317

318-
In order to not break backwards-compability, these can use the same generic-impl trick to
318+
In order to not break backwards-compatibility, these can use the same generic-impl trick to
319319
forward to the old traits, which would roughly look like this:
320320

321321
```rust

text/0550-macro-future-proofing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ ensures that a legal macro definition will continue to assign the same
183183
determination as to where `... tt` ends and `uu ...` begins, even as
184184
new syntactic forms are added to the language.
185185

186-
The second part says that a separated complex NT must use a seperator
186+
The second part says that a separated complex NT must use a separator
187187
token that is part of the predetermined follow set for the internal
188188
contents of the NT. This ensures that a legal macro definition will
189189
continue to parse an input fragment into the same delimited sequence
@@ -318,9 +318,9 @@ NT could be empty (i.e. ε ∈ FIRST(interior)). (I overlooked this fact
318318
in my first round of prototyping.)
319319

320320
NOTE: The above definition for LAST assumes that we keep our
321-
pre-existing rule that the seperator token in a complex NT is *solely* for
321+
pre-existing rule that the separator token in a complex NT is *solely* for
322322
separating elements; i.e. that such NT's do not match fragments that
323-
*end with* the seperator token. If we choose to lift this restriction
323+
*end with* the separator token. If we choose to lift this restriction
324324
in the future, the above definition will need to be revised
325325
accordingly.
326326

text/0587-fn-return-should-be-an-associated-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,6 @@ type variable).
179179

180180
We could make `FnMut()` desugar to `FnMut<()>`, and hence require an
181181
explicit `FnMut() -> ()` to bind the return type to unit. This feels
182-
suprising and inconsistent.
182+
surprising and inconsistent.
183183

184184

text/0592-c-str-deref.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ for representing borrowed C string data, since:
4343
to FFI functions without an intermediate allocation in `CString`.
4444

4545
As a pattern of owned/borrowed type pairs has been established
46-
thoughout other modules (see e.g.
46+
throughout other modules (see e.g.
4747
[path reform](https://github.com/rust-lang/rfcs/pull/474)),
4848
it makes sense that `CString` gets its own borrowed counterpart.
4949

text/0599-default-object-bound.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ expressions, they only include cover those cases where an explicit
111111
lifetime bound was required today. In function signatures, lifetime
112112
bounds can always be omitted, and it is impossible to distinguish
113113
`&SomeTrait` from `&SomeStruct` using only a regular
114-
expression. However, we belive that the proposed rule would be
114+
expression. However, we believe that the proposed rule would be
115115
compatible with the existing defaults for function signatures in all
116116
or virtually all cases.
117117

text/0640-debug-improvements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ to implement `Debug` manually.
1818

1919
The conventions for `Debug` format state that output should resemble Rust
2020
struct syntax, without added line breaks. This can make output difficult to
21-
read in the presense of complex and deeply nested structures:
21+
read in the presence of complex and deeply nested structures:
2222
```rust
2323
HashMap { "foo": ComplexType { thing: Some(BufferedReader { reader: FileStream { path: "/home/sfackler/rust/README.md", mode: R }, buffer: 1013/65536 }), other_thing: 100 }, "bar": ComplexType { thing: Some(BufferedReader { reader: FileStream { path: "/tmp/foobar", mode: R }, buffer: 0/65536 }), other_thing: 0 } }
2424
```

text/0771-std-iter-once.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ These wrapper structs exist to allow future backwards-compatible changes, and hi
4040

4141
# Drawbacks
4242

43-
Although a tiny amount of code, it still does come with a testing, maintainance, etc. cost.
43+
Although a tiny amount of code, it still does come with a testing, maintenance, etc. cost.
4444

4545
It's already possible to do this via `Some(x).into_iter()`, `std::iter::repeat(x).take(1)` (for `x: Clone`), `vec![x].into_iter()`, various contraptions involving `iterate`...
4646

text/0809-box-and-in-for-stdlib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ pub trait Place<Data: ?Sized> {
383383
/// intermediate values (e.g. the return value of `Vec::emplace_back`)
384384
/// or `Copy`, since the `make_place` method takes `self` by value.
385385
pub trait Placer<Data: ?Sized> {
386-
/// `Place` is the intermedate agent guarding the
386+
/// `Place` is the intermediate agent guarding the
387387
/// uninitialized state for `Data`.
388388
type Place: InPlace<Data>;
389389

text/2795-format-args-implicit-identifiers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ The following are motivations why this RFC argues this case:
146146
4 | println!(concat!("hello {person}"));
147147
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
148148

149-
* The expression may expand to a format string which contains new identifiers not written by the users, bypassing macro hygiene in suprising ways. For example, if the `concat!` macro did not have the hygiene issue described above, it could be to "splice together" an implicit named argument like so:
149+
* The expression may expand to a format string which contains new identifiers not written by the users, bypassing macro hygiene in surprising ways. For example, if the `concat!` macro did not have the hygiene issue described above, it could be to "splice together" an implicit named argument like so:
150150

151151
let person = "Charlie";
152152
println!(concat!("hello {p", "er", "son", "}"));
153153

154154
The RFC author argues that it appears highly undesirable that implicit capture of the `person` identifier should occur in this example given above.
155155

156-
* Using the hygienic context of the format string for implicit named arguments can have potentially suprising results even just with `macro_rules!` macros.
156+
* Using the hygienic context of the format string for implicit named arguments can have potentially surprising results even just with `macro_rules!` macros.
157157

158158
For example, the RFC author found that with a proof-of-concept implementation of implicit named arguments the invocation below would print `"Snoopy"`:
159159

0 commit comments

Comments
 (0)