]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Update SlicePattern typechecking against slice reference parents
authorYap Zhi Heng <yapzhhg@gmail.com>
Sun, 20 Jul 2025 07:55:51 +0000 (15:55 +0800)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 5 Aug 2025 14:36:58 +0000 (16:36 +0200)
commit495765758a3c434c6767610f377cace4bba8ff1c
treea428668cc1e295fe303e6133331e41da89fe2609
parent499a70699bcaff13998fa8eb6136c15dfa0b7f41
gccrs: Update SlicePattern typechecking against slice reference parents

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit(SlicePattern)):
Add new type check case for SliceType wrapped in ReferenceType.
* backend/rust-compile-pattern.cc: Adjusted the asserts accordingly for
CompilePatternCheckExpr(SlicePattern) & CompilePatternBindings(SlicePattern).

Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
gcc/rust/backend/rust-compile-pattern.cc
gcc/rust/typecheck/rust-hir-type-check-pattern.cc