Skip to content

Commit 95383ec

Browse files
committed
Removed trailing whitespace, added Object Safety clause
1 parent 5164816 commit 95383ec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/type-coercions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ sites are:
5252
Foo { x: &mut 42 };
5353
}
5454
```
55-
55+
5656
* Function results—either the final line of a block if it is not
5757
semicolon-terminated or any expression in a `return` statement
5858

@@ -168,7 +168,7 @@ an implementation of `Unsize<U>` for `T` will be provided:
168168

169169
* `[T; n]` to `[T]`.
170170

171-
* `T` to `dyn U`, when `T` implements `U + Sized`
171+
* `T` to `dyn U`, when `T` implements `U + Sized`, and `U` is [object safe].
172172

173173
* `Foo<..., T, ...>` to `Foo<..., U, ...>`, when:
174174
* `Foo` is a struct.
@@ -188,6 +188,7 @@ unsized coercion to `Foo<U>`.
188188
[RFC 401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
189189
[RFC 1558]: https://github.com/rust-lang/rfcs/blob/master/text/1558-closure-to-fn-coercion.md
190190
[subtype]: subtyping.md
191+
[object safe]: items/traits.md#object-safety
191192
[as]: expressions/operator-expr.md#type-cast-expressions
192193
[`Unsize`]: ../std/marker/trait.Unsize.html
193194
[`CoerceUnsized`]: ../std/ops/trait.CoerceUnsized.html

0 commit comments

Comments
 (0)