Skip to content

Commit c3d550c

Browse files
authored
Merge pull request #982 from mcclure/undefined-cast
Explicitly note any cast not defined in the documentation is illegal.
2 parents e32a2f9 + 3b3a6a5 commit c3d550c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/expressions/operator-expr.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ fn average(values: &[f64]) -> f64 {
306306
```
307307

308308
`as` can be used to explicitly perform [coercions](../type-coercions.md), as well as the following additional casts.
309+
Any cast that does not fit either a coercion rule or an entry in the table is a compiler error.
309310
Here `*T` means either `*const T` or `*mut T`.
310311

311312
| Type of `e` | `U` | Cast performed by `e as U` |

0 commit comments

Comments
 (0)