Clean up E0054

This commit is contained in:
Guillaume Gomez 2019-11-15 13:21:50 +01:00
parent 1a3c8c8964
commit 041c9f6f48

View File

@ -1,5 +1,6 @@
It is not allowed to cast to a bool. If you are trying to cast a numeric type
to a bool, you can compare it with zero instead:
It is not allowed to cast to a bool.
Erroneous code example:
```compile_fail,E0054
let x = 5;
@ -8,6 +9,9 @@ let x = 5;
let x_is_nonzero = x as bool;
```
If you are trying to cast a numeric type to a bool, you can compare it with
zero instead:
```
let x = 5;