Skip to content

Commit 4fd4186

Browse files
committed
Explicitly note any cast not defined in the documentation is illegal.
1 parent e32a2f9 commit 4fd4186

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/expressions/operator-expr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ fn average(values: &[f64]) -> f64 {
305305
}
306306
```
307307

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

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

0 commit comments

Comments
 (0)