Skip to content

Commit b1a00d6

Browse files
authored
Merge pull request #2118 from DanielEScherzer/patch-3
operator-expr: remove stray word in footnote
2 parents 6911d67 + 49c2136 commit b1a00d6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/expressions/operator-expr.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,17 +539,17 @@ reference types and `mut` or `const` in pointer types.
539539
| [Function pointer] | Integer | Function pointer to address cast |
540540
| Closure [^no-capture] | Function pointer | Closure to function pointer cast |
541541

542-
[^meta-compat]: where `T` and `V` have compatible metadata:
542+
[^meta-compat]: Where `T` and `V` have compatible metadata:
543543
* `V: Sized`, or
544544
* Both slice metadata (`*[u16]` -> `*[u8]`, `*str` -> `*(u8, [u32])`), or
545545
* Both the same trait object metadata, modulo dropping auto traits (`*dyn Debug` -> `*(u16, dyn Debug)`, `*dyn Debug + Send` -> `*dyn Debug`)
546546
* **Note**: *adding* auto traits is only allowed if the principal trait has the auto trait as a super trait (given `trait T: Send {}`, `*dyn T` -> `*dyn T + Send` is valid, but `*dyn Debug` -> `*dyn Debug + Send` is not)
547547
* **Note**: Generics (including lifetimes) must match (`*dyn T<'a, A>` -> `*dyn T<'b, B>` requires `'a = 'b` and `A = B`)
548548

549-
[^lessmut]: only when `m₁` is `mut` or `m₂` is `const`. Casting `mut` reference/pointer to
549+
[^lessmut]: Only when `m₁` is `mut` or `m₂` is `const`. Casting `mut` reference/pointer to
550550
`const` pointer is allowed.
551551

552-
[^no-capture]: only for closures that do not capture (close over) any local variables can be casted to function pointers.
552+
[^no-capture]: Only closures that do not capture (close over) any local variables can be cast to function pointers.
553553

554554
### Semantics
555555

src/items/enumerations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ assert_eq!(2, Enum::Baz as isize);
241241
```
242242

243243
r[items.enum.discriminant.coercion.fieldless]
244-
[Field-less enums] can be casted if they do not have explicit discriminants, or where only unit variants are explicit.
244+
[Field-less enums] can be cast if they do not have explicit discriminants, or where only unit variants are explicit.
245245

246246
```rust
247247
enum Fieldless {

src/items/traits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ trait DynIncompatible {
173173
fn foo() {} // ERROR: associated function without Sized
174174
fn returns(&self) -> Self; // ERROR: Self in return type
175175
fn typed<T>(&self, x: T) {} // ERROR: has generic type parameters
176-
fn nested(self: Rc<Box<Self>>) {} // ERROR: nested receiver cannot be downcasted
176+
fn nested(self: Rc<Box<Self>>) {} // ERROR: nested receiver cannot be dispatched on
177177
}
178178
179179
struct S;

0 commit comments

Comments
 (0)