diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-09-01 22:07:30 -0400 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-09-02 22:35:03 +0000 |
commit | cc42db3e7f03aed583ad5dc456ade978ceeaa87d (patch) | |
tree | c46c4e47f66fd3bc6bec99d7d8ddabb6dc2a1bf1 /gcc/rust/rust-gcc.cc | |
parent | abf727d29eb7d70e238fd837921f2e5fb4e3fec0 (diff) | |
download | gcc-cc42db3e7f03aed583ad5dc456ade978ceeaa87d.zip gcc-cc42db3e7f03aed583ad5dc456ade978ceeaa87d.tar.gz gcc-cc42db3e7f03aed583ad5dc456ade978ceeaa87d.tar.bz2 |
Improve type checking for if expressions
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-expr.cc
(TypeCheckExpr::visit): Expect if conditions to have type bool.
gcc/testsuite/ChangeLog:
* rust/compile/type-if.rs: New test.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
0 files changed, 0 insertions, 0 deletions