]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: introduce new types_compatable
authorPhilip Herron <herron.philip@googlemail.com>
Sat, 10 Jun 2023 20:07:27 +0000 (21:07 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 17:46:27 +0000 (18:46 +0100)
commita77f3c3b3655a2c7a0029887f9ef47b4df7b91f0
tree8e6e972c2725a6ba72ff54557c69f87335aa0b84
parentd41160ca9747e085e28130c38ec04804082a45e2
gccrs: introduce new types_compatable

This is an initiative to begin getting rid of the can_eq interface.

Addresses #2019

gcc/rust/ChangeLog:

* typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItemWithTrait::visit):
use new interface
* typecheck/rust-type-util.cc (types_compatable): implementation of new interface
* typecheck/rust-type-util.h (types_compatable): prototype
* typecheck/rust-unify.cc (UnifyRules::expect_placeholder):
It is allow for unification against placeholders

gcc/testsuite/ChangeLog:

* rust/compile/traits2.rs: update error message
* rust/compile/traits3.rs: update error message

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
gcc/rust/typecheck/rust-hir-type-check-implitem.cc
gcc/rust/typecheck/rust-type-util.cc
gcc/rust/typecheck/rust-type-util.h
gcc/rust/typecheck/rust-unify.cc
gcc/testsuite/rust/compile/traits2.rs
gcc/testsuite/rust/compile/traits3.rs