Skip to content

Commit 9552ca8

Browse files
committed
Fix typos in RFCs 2001-2250
1 parent a035f1e commit 9552ca8

19 files changed

+43
-43
lines changed

text/2025-nested-method-calls.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ to cover at some point in works like this:
340340
complicated method calls that are not covered by this proposal, such
341341
as the `v[0].push_str(&format!("{}", v.len()));` example. In that
342342
case, a simple desugaring can be used to show why the compiler
343-
rejects this code -- in particular, a comparison with the errorneous
343+
rejects this code -- in particular, a comparison with the erroneous
344344
examples may be helpful. A keen observer may note the contrast with
345345
`vec.push(vec.len())`, but such an observer can be referred to the
346346
reference. =)
@@ -604,7 +604,7 @@ whether a borrow is activated is affected by "no-ops" like `let x = y`
604604

605605
Therefore, introducing two-phased borrows **outside** of method-call
606606
desugaring form doesn't feel like the right approach. (But, if they
607-
are limited to method-call desugaring, as ths RFC proposes, then they
607+
are limited to method-call desugaring, as this RFC proposes, then they
608608
are a simple and effective mechanism without broader impact.)
609609

610610
### Borrowing for the future
@@ -765,7 +765,7 @@ makes the Rust system qualitatively more complex to reason about.
765765

766766
If all this talk of "steps in complexity" seems abstract, I think that
767767
the most immediate way it will surface is when we try to
768-
**teach**. Supporting discontinous borrows just makes it that much
768+
**teach**. Supporting discontinuous borrows just makes it that much
769769
harder to craft small examples that show how borrowing works. It will
770770
make the system feel more mysterious, since the underlying rules are
771771
indeed more complex and thus harder to "intuit" on your own. Getting

text/2045-target-feature.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The objective of this RFC is to extend the Rust language to solve these three pr
2525

2626
## Target features
2727

28-
Each rustc target has a default set of target features that can be controled via
28+
Each rustc target has a default set of target features that can be controlled via
2929
the backend compilation options. The target features for each target should
3030
be documented by the compiler and the backends (e.g. LLVM).
3131

@@ -460,13 +460,13 @@ What happens if the macro `cfg!(target_feature = "feature_name")` is used inside
460460

461461
This might result in monomorphization errors if `#![cfg(target_feature)]` is used, but not if `if cfg!(target_feature)` is used since in this case all branches need to type-check properly.
462462

463-
We might want to ammend this RFC with more concrete semantics about this as we improve the compiler.
463+
We might want to amend this RFC with more concrete semantics about this as we improve the compiler.
464464

465465
## How do we handle ABI issues with portable vector types?
466466

467467
The ABI of `#[target_feature]` functions does not change for all types currently available in stable Rust. However, there are types that we might want to add to the language at some point, like portable vector types, for which this is not the case.
468468

469-
The behavior of `#[target_feature]` for those types should be specified in the RFC that proposes to stabilize those types, and this RFC should be ammended as necessary.
469+
The behavior of `#[target_feature]` for those types should be specified in the RFC that proposes to stabilize those types, and this RFC should be amended as necessary.
470470

471471
The following examples showcase some potential problems when calling functions with mismatching ABIs, or when using function pointers.
472472

text/2052-epochs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ We'll wrap up with the full details of the mechanisms at play.
404404
[how-we-teach-this]: #how-we-teach-this
405405

406406
First and foremost, if we accept this RFC, we should publicize the plan widely,
407-
including on the main Rust blog, in a style simlar to [previous posts] about our
407+
including on the main Rust blog, in a style similar to [previous posts] about our
408408
release policy. This will require extremely careful messaging, to make clear
409409
that editions are *not* about breaking Rust code, but instead *primarily*
410410
about putting together a globally coherent, polished product on a regular basis,

text/2057-refcell-replace.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ counter.replace(counter.replace(0) - 1);
7575
```
7676

7777
Also, we're adding more specific functions to a core type.
78-
That comes with cost in documentation and maintainance.
78+
That comes with cost in documentation and maintenance.
7979

8080
# Alternatives
8181
[alternatives]: #alternatives

text/2089-implied-bounds.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ impl Set<NotHash> { ... }
655655
```
656656
the error will not be caught until someone actually uses `Set<NotHash>`.
657657

658-
The idea is, when encountering an fn/trait impl/inherent impl, retrieve all input types that appear in the signature / header and for each input type `T`, do the following: retrieve type variables `X1, ..., Xn` bound by the declaration and ask for `∃X1, ..., ∃Xn; WF(T)` in an empty enviromnent (in Chalk terms). If there is no possible substitution for the existentials, output a warning.
658+
The idea is, when encountering an fn/trait impl/inherent impl, retrieve all input types that appear in the signature / header and for each input type `T`, do the following: retrieve type variables `X1, ..., Xn` bound by the declaration and ask for `∃X1, ..., ∃Xn; WF(T)` in an empty environment (in Chalk terms). If there is no possible substitution for the existentials, output a warning.
659659

660660
Example:
661661
```rust
@@ -687,7 +687,7 @@ trait Bar where Self: Foo { }
687687
// `Self: Foo` holds if `WF(Self: Bar)`
688688
// `WF(Self: Foo)` holds if `WF(Self: Bar)`
689689
```
690-
Now suppose we are asking wether `u8: Foo` holds. The following branch exists in the proof tree:
690+
Now suppose we are asking whether `u8: Foo` holds. The following branch exists in the proof tree:
691691
`u8: Foo` holds if `WF(u8: Bar)` holds if `u8: Foo` holds.
692692

693693
I *think* rustc would have the right behavior currently: just dismiss this branch since it only leads to the tautological rule `(u8: Foo) if (u8: Foo)`.
@@ -705,7 +705,7 @@ In Chalk we have a more sophisticated cycle detection strategy based on tabling,
705705

706706
## Including parameters in well-formedness rules
707707

708-
Specific to this design: instead of disregarding parameters in well-formedness checks, we could have included them, and added reverse rules of the form: "`WF(T)` holds if `WF(Struct<T>)` holds". From a theoretical point of view, this would have had the same effects as the current design, and would have avoided the whole `InputTypes` thing. However, implementation in Chalk revelead some tricky issues. Writing in Chalk-style, suppose we have rules like:
708+
Specific to this design: instead of disregarding parameters in well-formedness checks, we could have included them, and added reverse rules of the form: "`WF(T)` holds if `WF(Struct<T>)` holds". From a theoretical point of view, this would have had the same effects as the current design, and would have avoided the whole `InputTypes` thing. However, implementation in Chalk revealed some tricky issues. Writing in Chalk-style, suppose we have rules like:
709709
```
710710
WF(Struct<T>) :- WF(T)
711711
WF(T) :- WF(Struct<T>)

text/2091-inline-semantic.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ This RFC tries to abide by the following restrictions:
878878
accepts the caller information; it shouldn't require the trait itself to enforce it. It
879879
should not affect the signature of the function. This is an extension of rule 2, since the
880880
`Index` trait is involved in `HashMap::index`. The stability of `Index` must be upheld, e.g. it
881-
should remain object-safe, and existing implementions should not be forced to accept the caller
881+
should remain object-safe, and existing implementations should not be forced to accept the caller
882882
location.
883883

884884
Restriction 4 "interface independence" is currently not implemented due to lack of
@@ -1031,7 +1031,7 @@ extern {
10311031
fn close_fd(fd: c_int);
10321032
}
10331033

1034-
// declaration + defintion
1034+
// declaration + definition
10351035
#[precondition(option.is_some(), "Trying to unwrap None")]
10361036
fn unwrap<T>(option: Option<T>) -> T {
10371037
match option {

text/2093-infer-outlives.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,10 @@ changed to (e.g.) remove the field `vec`, then it may no longer
356356
require that `T: 'a` holds, and hence `foo()` would no longer have the
357357
implied bound that `T: 'a` holds.
358358

359-
This situation is considerd unlikely: typically, if a struct has a
359+
This situation is considered unlikely: typically, if a struct has a
360360
lifetime parameter (such as the `Iter` struct), then the fact that
361361
it contains (or may contain) a borrowed reference is rather
362-
fundamental to how it works. If that borrowed refernce were to be
362+
fundamental to how it works. If that borrowed reference were to be
363363
removed entirely, then the struct's API will likely be changing in
364364
other incompatible ways, since that implies that the struct is now
365365
taking ownership of data it used to borrow (or else has access to less

text/2094-nll.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ speak). This can range from a few sequential statements (as in problem
435435
case #1) to something more complex, such as covering one arm in a
436436
match but not the others (problem case #2).
437437

438-
However, in order to sucessfully type the full range of examples that
438+
However, in order to successfully type the full range of examples that
439439
we would like, we have to go a bit further than just changing
440440
lifetimes to a portion of the control-flow graph. **We also have to
441441
take location into account when doing subtyping checks**. This is in
@@ -670,7 +670,7 @@ and the notation `'a` refers to some named lifetime inference variable
670670
Once the constraints are created, the **inference algorithm** solves
671671
the constraints. This is done via fixed-point iteration: each
672672
lifetime variable begins as an empty set and we iterate over the
673-
constaints, repeatedly growing the lifetimes until they are big enough
673+
constraints, repeatedly growing the lifetimes until they are big enough
674674
to satisfy all constraints.
675675

676676
(If you'd like to compare this to the prototype code, the file
@@ -954,7 +954,7 @@ use" (and hence their "locks" still enforced).
954954
Once the constraints are created, the **inference algorithm** solves
955955
the constraints. This is done via fixed-point iteration: each
956956
lifetime variable begins as an empty set and we iterate over the
957-
constaints, repeatedly growing the lifetimes until they are big enough
957+
constraints, repeatedly growing the lifetimes until they are big enough
958958
to satisfy all constraints.
959959

960960
The meaning of a constraint like `('a: 'b) @ P` is that, starting from
@@ -1756,7 +1756,7 @@ U. In general, the approach is to describe the errors in "narrative" form:
17561756

17571757
- First, value is borrowed occurs.
17581758
- Next, the action occurs, invalidating the reference.
1759-
- Finally, the next use occcurs, after the reference has been invalidated.
1759+
- Finally, the next use occurs, after the reference has been invalidated.
17601760

17611761
This approach is similar to what we do today, but we often neglect to
17621762
mention this third point, where the next use occurs. Note that the
@@ -2082,7 +2082,7 @@ proposal was `Ref2<'r, 'w>`, in which mutable references change to
20822082
have two distinct lifetimes, a "read" lifetime (`'r`) and a "write"
20832083
lifetime (`'w`), where read encompasses the entire span of the
20842084
reference, but write only contains those points where writes are
2085-
occuring. This RFC does not attempt to change the approach to nested
2085+
occurring. This RFC does not attempt to change the approach to nested
20862086
method calls, rather continuing with the RFC 2025 approach (which
20872087
affects only the borrowck handling). However, if we did wish to adopt
20882088
a `Ref2`-style approach in the future, it could be done backwards

text/2102-unnamed-fields.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ support references to named structures.
549549
## Allowing type parameters
550550

551551
We could allow the type parameters of generic types as the named type of an
552-
unamed field. This could allow creative flexibility in API design, such as
552+
unnamed field. This could allow creative flexibility in API design, such as
553553
having a generic type that adds a field alongside the fields of the type it
554554
contains. However, this could also lead to much more complex errors that do not
555555
arise until the point that code references the generic type. Prohibiting the

text/2103-tool-attributes.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn foo() {}
2929
```
3030

3131
This would be allowed by the compiler but ignored. When Rustfmt is run on the
32-
crate, it will read the attibute and skip formatting `foo` (note that we make no
32+
crate, it will read the attribute and skip formatting `foo` (note that we make no
3333
provision for reading the attribute or doing anything with it, that is all up to
3434
the tool).
3535

@@ -85,7 +85,7 @@ compiler warning about unused lints. E.g., we want a user to be able to write
8585

8686
This section assumes that attributes (e.g., `#[test]`) have already been taught.
8787

88-
You can use attibutes in your crate to pass information to tools. For now, this
88+
You can use attributes in your crate to pass information to tools. For now, this
8989
facility is limited to the tools we include with the Rust distribution.
9090

9191
The names of these attributes are a path starting with the name of a tool, and
@@ -157,7 +157,7 @@ A similar opt-in mechanism will exist for lints.
157157
## Proposed for immediate implementation
158158

159159
There is an attribute path white list of the names of tools shipped with the Rust
160-
distribution. Any crate can use an attibute path starting with those names and
160+
distribution. Any crate can use an attribute path starting with those names and
161161
the attribute will not trigger the custom attribute lint or require a macro
162162
feature gate.
163163

@@ -205,10 +205,10 @@ check for unused attributes/lints as part of a possible long-term solution
205205
without introducing new warnings or errors.
206206

207207

208-
### Forward and backward compatability
208+
### Forward and backward compatibility
209209

210210
Since custom attributes are feature gated and scoped attributes are part of the
211-
unstable macros 2.0 work, there is no backwards compatability issue.
211+
unstable macros 2.0 work, there is no backwards compatibility issue.
212212

213213
For tools who want to move to these newly stable attributes (e.g., from
214214
`rustfmt_skip` to `rustfmt::skip`) they will have to manage the change

0 commit comments

Comments
 (0)