aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/tree/rust-hir-expr.h
diff options
context:
space:
mode:
authorYap Zhi Heng <yapzhhg@gmail.com>2025-07-23 08:24:18 +0800
committerArthur Cohen <arthur.cohen@embecosm.com>2025-08-05 16:36:58 +0200
commite80e577df7ca410eac549da61f9a9fd702dc55ea (patch)
tree6c65976ebc9f32f7688d73867941d7dcbb763079 /gcc/rust/hir/tree/rust-hir-expr.h
parent495765758a3c434c6767610f377cace4bba8ff1c (diff)
downloadgcc-e80e577df7ca410eac549da61f9a9fd702dc55ea.zip
gcc-e80e577df7ca410eac549da61f9a9fd702dc55ea.tar.gz
gcc-e80e577df7ca410eac549da61f9a9fd702dc55ea.tar.bz2
gccrs: Implement compilation for SlicePattern against SliceType scrutinee
006t.original output from compiling testsuite/rust/compile/match-slicepattern-slice.rs: ... RUSTTMP.3 = slice; if (RUSTTMP.3.len == 1 && *(RUSTTMP.3.data + 0 * 4) == 1) { { struct () RUSTTMP.4; { } goto <D.129>; } } if (RUSTTMP.3.len == 2 && *(RUSTTMP.3.data + 1 * 4) == 2) { { struct () RUSTTMP.5; { } goto <D.129>; } } if (1) { { struct () RUSTTMP.6; { } goto <D.129>; } } <D.129>:; ... gcc/rust/ChangeLog: * rust-backend.h: New slice_index_expression function. * rust-gcc.cc: Implementation of slice_index_expression to generate tree node for accessing slice elements. * backend/rust-compile-pattern.cc: Implement SlicePattern check expression & binding compilation against SliceType scrutinee. Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
Diffstat (limited to 'gcc/rust/hir/tree/rust-hir-expr.h')
0 files changed, 0 insertions, 0 deletions