@@ -199,6 +199,10 @@ relate to converting types to unsized types, and are permitted in a few
199
199
cases where other coercions are not, as described above. They can still happen
200
200
anywhere else a coercion can occur.
201
201
202
+ r[ coerce.unsize.misnomer]
203
+ > Note: "unsizing" is a bit of a misnomer,
204
+ > since this covers unsized->unsized coercions too.
205
+
202
206
r[ coerce.unsize.trait]
203
207
Two traits, [ ` Unsize ` ] and [ ` CoerceUnsized ` ] , are used
204
208
to assist in this process and expose it for library use. The following
@@ -213,6 +217,8 @@ r[coerce.unsize.trait-object]
213
217
214
218
r[ coerce.unsize.trait-upcast]
215
219
* ` dyn T ` to ` dyn U ` , when ` U ` is one of ` T ` 's supertraits.
220
+ * ` dyn T ` to ` dyn U ` when ` U ` is one of ` T ` 's [ supertraits] .
221
+ * This allows dropping auto traits, i.e. ` dyn T + Auto ` to ` dyn U ` is allowed.
216
222
217
223
r[ coerce.unsized.composite]
218
224
* ` Foo<..., T, ...> ` to ` Foo<..., U, ...> ` , when:
@@ -330,3 +336,4 @@ precisely.
330
336
[ `Unsize` ] : std::marker::Unsize
331
337
[ `CoerceUnsized` ] : std::ops::CoerceUnsized
332
338
[ method-call expressions ] : expressions/method-call-expr.md
339
+ [ supertraits ] : items/traits.md#supertraits
0 commit comments