aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2021-08-16 18:44:47 +0200
committerMarc <dkm@kataplop.net>2021-08-18 22:59:35 +0200
commiteb5e504ec28bff08795c7a3aa541a555208e2517 (patch)
treedc24c1684e1bb2155729e50fdcf2a315922f0024 /gcc/rust/backend
parentd9082b50a98168b766cfc5136f50a3497c14897d (diff)
downloadgcc-eb5e504ec28bff08795c7a3aa541a555208e2517.zip
gcc-eb5e504ec28bff08795c7a3aa541a555208e2517.tar.gz
gcc-eb5e504ec28bff08795c7a3aa541a555208e2517.tar.bz2
Allow bool and char to be cast as any integer type
bools and chars can be cast to any integer type, but not to floats or each other. Adjust the BoolCastRule and CharCastRule to allow these casts. Add a postive test "as_bool_char.rs" and negative test "bad_as_bool_char.rs" to check the correct casts are accepted and the illegal casts produce errors. Resolves: https://github.com/Rust-GCC/gccrs/issues/629
Diffstat (limited to 'gcc/rust/backend')
0 files changed, 0 insertions, 0 deletions