diff --git a/doc/langref.html.in b/doc/langref.html.in index b76fc69385..8e24a4be2c 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -3602,6 +3602,10 @@ test "implicit cast - invoke a type as a function" { var b = u16(a); } {#code_end#} +

+ Implicit casts are only allowed when it is completely unambiguous how to get from one type to another, + and the transformation is guaranteed to be safe. +

{#header_open|Implicit Cast: Stricter Qualification#}

Values which have the same representation at runtime can be cast to increase the strictness @@ -3722,7 +3726,32 @@ test "float widening" { {#header_close#} {#header_open|Explicit Casts#} -

TODO

+

+ Explicit casts are performed via {#link|Builtin Functions#}. + Some explicit casts are safe; some are not. + Some explicit casts perform language-level assertions; some do not. + Some explicit casts are no-ops at runtime; some are not. +

+ {#header_close#} {#header_open|Peer Type Resolution#}