gccrs: remove old generics hack to reuse generic symbols from previous seg
commitf1d0b22c79316d8ee403c83be55ef45186bea38a
authorPhilip Herron <herron.philip@googlemail.com>
Sat, 3 Feb 2024 11:34:30 +0000 (3 11:34 +0000)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 7 Feb 2024 11:40:23 +0000 (7 12:40 +0100)
tree62dfc3d3006155ebef7211c55181749146d2f30f
parent1c649ac36f1eab8094fb0a697c001e064c031ac1
gccrs: remove old generics hack to reuse generic symbols from previous seg

This patch introduces one regression because generics are getting better
understood over time. The code here used to apply generics with the same
symbol from previous segments which was a bit of a hack with out limited
inference variable support. The regression looks like it will be related
to another issue which needs to default integer inference variables much
more aggresivly to default integer.

Fixes #2723

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): remove hack

gcc/testsuite/ChangeLog:

* rust/compile/issue-1773.rs: Moved to...
* rust/compile/issue-1773.rs.bak: ...here.
* rust/compile/issue-2723-1.rs: New test.
* rust/compile/issue-2723-2.rs: New test.
gcc/rust/typecheck/rust-hir-type-check-path.cc
gcc/testsuite/rust/compile/issue-1773.rs.bak [moved from gcc/testsuite/rust/compile/issue-1773.rs with 100% similarity]
gcc/testsuite/rust/compile/issue-2723-1.rs [new file with mode: 0644]
gcc/testsuite/rust/compile/issue-2723-2.rs [new file with mode: 0644]