Skip to content

Commit 4605af9

Browse files
crlf0710WaffleLapkin
authored andcommitted
Add trait_upcasting related languages changes
1 parent 4249fb4 commit 4605af9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/type-coercions.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ r[coerce.unsize]
191191

192192
r[coerce.unsize.intro]
193193
The following coercions are called `unsized coercions`, since they
194-
relate to converting sized types to unsized types, and are permitted in a few
194+
relate to converting types to unsized types, and are permitted in a few
195195
cases where other coercions are not, as described above. They can still happen
196196
anywhere else a coercion can occur.
197197

@@ -207,6 +207,9 @@ r[coerce.unsize.slice]
207207
r[coerce.unsize.trait-object]
208208
* `T` to `dyn U`, when `T` implements `U + Sized`, and `U` is [dyn compatible].
209209

210+
r[coerce.unsize.trait-upcast]
211+
* `dyn T` to `dyn U`, when `T` has `U` as one of its ancestor trait.
212+
210213
r[coerce.unsized.composite]
211214
* `Foo<..., T, ...>` to `Foo<..., U, ...>`, when:
212215
* `Foo` is a struct.

0 commit comments

Comments
 (0)