Skip to content

Commit c507a9e

Browse files
authored
Merge pull request #556 from u32i64/patch-1
Typo fixes
2 parents 27ad493 + f5ebab2 commit c507a9e

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

src/expressions/match-expr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ let message = match maybe_digit {
113113
```
114114

115115
> Note: Multiple matches using the `|` operator can cause the pattern guard and
116-
> and side effects it has to execute multiple times. For example:
116+
> the side effects it has to execute multiple times. For example:
117117
>
118118
> ```rust
119119
> # use std::cell::Cell;

src/expressions/operator-expr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Dereferencing a raw pointer requires `unsafe`.
9393

9494
On non-pointer types `*x` is equivalent to `*std::ops::Deref::deref(&x)` in an
9595
[immutable place expression context](expressions.html#mutability) and
96-
`*std::ops::Deref::deref_mut(&mut x)` in a mutable place expression context.
96+
`*std::ops::DerefMut::deref_mut(&mut x)` in a mutable place expression context.
9797

9898
```rust
9999
let x = &7;
@@ -131,7 +131,7 @@ println!("{:?}", res);
131131
# assert!(res.is_err())
132132
```
133133

134-
When applied to values of the `Option<T>` type, it propagates `Nones`. If the
134+
When applied to values of the `Option<T>` type, it propagates `None`s. If the
135135
value is `None`, then it will return `None`. If applied to `Some(x)`, then it
136136
will unwrap the value to evaluate to `x`.
137137

src/special-types-and-traits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ according to the following rules:
110110
closure that captures a `T` by shared reference and a `U` by value implements
111111
any auto traits that both `&T` and `U` do.
112112

113-
For generic types (counting the built-in types above as generic over `T`), if an
113+
For generic types (counting the built-in types above as generic over `T`), if a
114114
generic implementation is available, then the compiler does not automatically
115115
implement it for types that could use the implementation except that they do not
116116
meet the requisite trait bounds. For instance, the standard library implements

src/type-coercions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Coercion is allowed between the following types:
9696
* `T_1` to `T_3` where `T_1` coerces to `T_2` and `T_2` coerces to `T_3`
9797
(*transitive case*)
9898

99-
Note that this is not fully supported yet
99+
Note that this is not fully supported yet.
100100

101101
* `&mut T` to `&T`
102102

@@ -158,9 +158,9 @@ cases where other coercions are not, as described above. They can still happen
158158
anywhere else a coercion can occur.
159159

160160
Two traits, [`Unsize`] and [`CoerceUnsized`], are used
161-
to assist in this process and expose it for library use. The compiler following
162-
coercions are built-in and, if `T` can be coerced to `U` with one of the, then
163-
the compiler will provide an implementation of `Unsize<U>` for `T`:
161+
to assist in this process and expose it for library use. The following
162+
coercions are built-ins and, if `T` can be coerced to `U` with one of them, then
163+
an implementation of `Unsize<U>` for `T` will be provided:
164164

165165
* `[T; n]` to `[T]`.
166166

@@ -182,5 +182,5 @@ unsized coercion to `Foo<U>`.
182182
> has been stabilized, the traits themselves are not yet stable and therefore
183183
> can't be used directly in stable Rust.
184184
185-
[Unsize]: ../std/marker/trait.Unsize.html
186-
[CoerceUnsized]: ../std/ops/trait.CoerceUnsized.html
185+
[`Unsize`]: ../std/marker/trait.Unsize.html
186+
[`CoerceUnsized`]: ../std/ops/trait.CoerceUnsized.html

src/type-layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ The union will have a size of the maximum size of all of its fields rounded to
205205
its alignment, and an alignment of the maximum alignment of all of its fields.
206206
These maximums may come from different fields.
207207

208-
```
208+
```rust
209209
#[repr(C)]
210210
union Union {
211211
f1: u16,

src/types/trait-object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ of the base trait.
1717
Trait objects are written as the optional keyword `dyn` followed by a set of
1818
trait bounds, but with the following restrictions on the trait bounds. All
1919
traits except the first trait must be auto traits, there may not be more than
20-
one lifetime, and opt-out bounds (e.g. `?sized`) are not allowed. Furthermore,
20+
one lifetime, and opt-out bounds (e.g. `?Sized`) are not allowed. Furthermore,
2121
paths to traits may be parenthesized.
2222

2323
For example, given a trait `Trait`, the following are all trait objects:

src/variables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ fn initialization_example() {
4141
// uninit_after_if; // err: use of possibly uninitialized `uninit_after_if`
4242
}
4343
```
44+
45+
[`if` expression]: expressions/if-expr.html#if-expressions

0 commit comments

Comments
 (0)