aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-ast-tokenstream.cc
diff options
context:
space:
mode:
authorEmanuele Micheletti <micheletti.emanuele@hotmail.com>2023-03-31 12:50:36 +0200
committerPhilip Herron <philip.herron@embecosm.com>2023-04-02 21:08:56 +0000
commitf990f89e90aba1a0123aba9b6cc29827202c2adf (patch)
tree3e707ff5d3f5a35a2583adf174ca67b4f0d4e2d2 /gcc/rust/ast/rust-ast-tokenstream.cc
parent1ef39479434ce54879e46926d1ac1c12009c5c07 (diff)
downloadgcc-f990f89e90aba1a0123aba9b6cc29827202c2adf.zip
gcc-f990f89e90aba1a0123aba9b6cc29827202c2adf.tar.gz
gcc-f990f89e90aba1a0123aba9b6cc29827202c2adf.tar.bz2
gccrs: Fix bad cast as a char
In rust cast to char is allowed only from u8 type. This patch handles fix the case when the type is infered from an integer value, allowing only the u8 case' Fixes #2027 gcc/rust/ChangeLog: * typecheck/rust-casts.cc (TypeCastRules::cast_rules): case INTEGRAL handles TypeKind::CHAR gcc/testsuite/ChangeLog: * rust/compile/cast5.rs: New test. Signed-off-by: Emanuele Micheletti <micheletti.emanuele@hotmail.com>
Diffstat (limited to 'gcc/rust/ast/rust-ast-tokenstream.cc')
0 files changed, 0 insertions, 0 deletions