Skip to content

Commit

Permalink
Fix some comments
Browse files Browse the repository at this point in the history
Signed-off-by: JohnEndson <[email protected]>
  • Loading branch information
JohnEndson authored and tshepang committed Mar 28, 2024
1 parent 1ddb90c commit 35e77b8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Example of case (1):
```rust
type Opaque<X> = impl Sized;

// `T` is a type paramter.
// `T` is a type parameter.
// Opaque<T> := ();
fn good<T>() -> Opaque<T> {}

Expand All @@ -42,7 +42,7 @@ fn bad<T>(t: T) -> Opaque<T, T> { t } //~ ERROR
```
**Motivation:** In the first case `Opaque<()> := ()`, the hidden type is ambiguous because
it is compatible with two different interpretaions: `Opaque<X> := X` and `Opaque<X> := ()`.
Similarily for the second case `Opaque<T, T> := T`, it is ambiguous whether it should be
Similarly for the second case `Opaque<T, T> := T`, it is ambiguous whether it should be
interpreted as `Opaque<X, Y> := X` or as `Opaque<X, Y> := Y`.
Because of this ambiguity, both cases are rejected as invalid defining uses.

Expand Down
2 changes: 1 addition & 1 deletion src/building/suggested.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ let
''
pkgs.mkShell {
/* ... */
# This environment varaible tells bootstrap where our config.toml is.
# This environment variable tells bootstrap where our config.toml is.
RUST_BOOTSTRAP_CONFIG = config;
}
```
Expand Down
2 changes: 1 addition & 1 deletion src/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ error: Please commit or stash them.
(See <https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F#_the_three_states> for the difference between the two.)

This means you have made changes since the last time you made a commit. To be able to rebase, either
commit your changes, or make a temporary commit called a "stash" to have them still not be commited
commit your changes, or make a temporary commit called a "stash" to have them still not be committed
when you finish rebasing. You may want to configure git to make this "stash" automatically, which
will prevent the "cannot rebase" error in nearly all cases:

Expand Down
2 changes: 1 addition & 1 deletion src/solve/invariants.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ a few of them do not hold in Rust right now. This is either a fundamental to its
caused by bugs and something that may change in the future.

It is important to know about the things you can assume while working on - and with - the
type system, so here's an incomplete and inofficial list of invariants of
type system, so here's an incomplete and unofficial list of invariants of
the core type system:

- ✅: this invariant mostly holds, with some weird exceptions, you can rely on it outside
Expand Down
2 changes: 1 addition & 1 deletion src/what-does-early-late-bound-mean.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ closure type. Closures are [currently unsound](https://github.com/rust-lang/rust
ways that are closely related to the distinction between early/late bound
parameters (more on this later)

The early/late boundness of generic parameters is only relevent for the desugaring of
The early/late boundness of generic parameters is only relevant for the desugaring of
functions/closures into types with builtin `Fn*` impls. It does not make sense to talk about
in other contexts.

Expand Down

0 comments on commit 35e77b8

Please sign in to comment.