aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2asm.cc
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2024-11-21 17:36:34 +0000
committerCohenArthur <arthur.cohen@embecosm.com>2024-11-22 13:53:47 +0000
commit433a09278263a13b8aff12fbbc61d2e8723c947a (patch)
tree37cebe5ae1cf85f5e2ee0548e1cbcf389d738f6b /gcc/dwarf2asm.cc
parentb3f0d72ba8d365fd0cdabbe216acbbebfabb5df4 (diff)
downloadgcc-433a09278263a13b8aff12fbbc61d2e8723c947a.zip
gcc-433a09278263a13b8aff12fbbc61d2e8723c947a.tar.gz
gcc-433a09278263a13b8aff12fbbc61d2e8723c947a.tar.bz2
gccrs: empty match expressions should resolve to !
This is a special case in Rust and the ! type can unify with pretty much anything its almost a inference variable and a unit-type for special cases. Fixes Rust-GCC/gccrs#3231 Fixes Rust-GCC/gccrs#2567 gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (check_match_scrutinee): check for empty match (CompileExpr::visit): fix assertion * checks/errors/rust-hir-pattern-analysis.cc (check_match_usefulness): check for empty * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): resolve to ! gcc/testsuite/ChangeLog: * rust/compile/exhaustiveness1.rs: remove bad check * rust/compile/issue-2567-1.rs: New test. * rust/compile/issue-2567-2.rs: New test. * rust/compile/issue-2567-3.rs: New test. * rust/compile/issue-3231.rs: New test. Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/dwarf2asm.cc')
0 files changed, 0 insertions, 0 deletions