@@ -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
@@ -212,7 +216,8 @@ r[coerce.unsize.trait-object]
212
216
* ` T ` to ` dyn U ` , when ` T ` implements ` U + Sized ` , and ` U ` is [ dyn compatible] .
213
217
214
218
r[ coerce.unsize.trait-upcast]
215
- * ` dyn T ` to ` dyn U ` , when ` U ` is one of ` T ` 's supertraits.
219
+ * ` dyn T ` to ` dyn U ` , when ` U ` is one of ` T ` 's [ supertraits] .
220
+ * This allows dropping auto traits, i.e. ` dyn T + Auto ` to ` dyn U ` is allowed.
216
221
217
222
r[ coerce.unsized.composite]
218
223
* ` Foo<..., T, ...> ` to ` Foo<..., U, ...> ` , when:
@@ -330,3 +335,4 @@ precisely.
330
335
[ `Unsize` ] : std::marker::Unsize
331
336
[ `CoerceUnsized` ] : std::ops::CoerceUnsized
332
337
[ method-call expressions ] : expressions/method-call-expr.md
338
+ [ supertraits ] : items/traits.md#supertraits
0 commit comments