File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 44They happen automatically at specific locations and are highly restricted in
55what types actually coerce.
66
7+ The [ type cast operator] , ` as ` , is not a coersion site. However, most type
8+ conversions allowed by coersion can also be explicitly performed by ` as ` .
9+
710Coercions are originally defined in [ RFC 401] and expanded upon in [ RFC 1558] .
811
12+
913## Coercion sites
1014
1115A coercion can only occur at certain coercion sites in a program; these are
@@ -65,10 +69,6 @@ sites are:
6569 }
6670 ```
6771
68- * The [ as] type cast operator&mdash ; while not a coercion site&mdash ; can be used to
69- explicitly perform type coercion.
70-
71-
7272If the expression in one of these coercion sites is a coercion-propagating
7373expression, then the relevant sub-expressions in that expression are also
7474coercion sites. Propagation recurses from these new coercion sites.
@@ -190,6 +190,6 @@ unsized coercion to `Foo<U>`.
190190[ RFC 1558 ] : https://github.com/rust-lang/rfcs/blob/master/text/1558-closure-to-fn-coercion.md
191191[ subtype ] : subtyping.md
192192[ object safe ] : items/traits.md#object-safety
193- [ as ] : expressions/operator-expr.md#type-cast-expressions
193+ [ type cast operator ] : expressions/operator-expr.md#type-cast-expressions
194194[ `Unsize` ] : ../std/marker/trait.Unsize.html
195195[ `CoerceUnsized` ] : ../std/ops/trait.CoerceUnsized.html
You can’t perform that action at this time.
0 commit comments