gccrs: bugfix: initialize slice from array in const context
authorFaisal Abbas <90.abbasfaisal@gmail.com>
Sun, 4 Sep 2022 15:07:43 +0000 (16:07 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 31 Jan 2023 13:16:51 +0000 (14:16 +0100)
commit689a5c6711b8217158988763ba25959f8112dcfc
tree6cae8a422e90284bcc28b57cd300f3f0a363c9f6
parent0fffc0e772d612d5c6ad72a632ac80b43eca1950
gccrs: bugfix: initialize slice from array in const context

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Turn
constant item typechecking into a coercion site instead of a unify
site.

gcc/testsuite/ChangeLog:

* rust/compile/const6.rs: New test.

Signed-off-by: Faisal Abbas <90.abbasfaisal@gmail.com>
gcc/rust/typecheck/rust-hir-type-check-stmt.cc
gcc/testsuite/rust/compile/const6.rs [new file with mode: 0644]