Skip to content

Commit 839e7b6

Browse files
authored
Merge pull request #118 from vorner/coercion-dyn
Trivial updates to the coercions chapter
2 parents 8b8c4d1 + c61953a commit 839e7b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/coercions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ for all pointer types (including smart pointers like Box and Rc). Unsize is
2424
only implemented automatically, and enables the following transformations:
2525

2626
* `[T; n]` => `[T]`
27-
* `T` => `Trait` where `T: Trait`
27+
* `T` => `dyn Trait` where `T: Trait`
2828
* `Foo<..., T, ...>` => `Foo<..., U, ...>` where:
2929
* `T: Unsize<U>`
3030
* `Foo` is a struct
@@ -51,7 +51,7 @@ receivers, see below). If there is an impl for some type `U` and `T` coerces to
5151
following will not type check, even though it is OK to coerce `t` to `&T` and
5252
there is an impl for `&T`:
5353

54-
```rust,ignore
54+
```rust,compile_fail
5555
trait Trait {}
5656
5757
fn foo<X: Trait>(t: X) {}

0 commit comments

Comments
 (0)