aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/Make-lang.in
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2023-01-30 18:19:07 +0000
committerArthur Cohen <arthur.cohen@embecosm.com>2023-04-06 10:47:21 +0200
commit68d671ac725eb0937a892516906e300ad8a3c538 (patch)
treeaccf7cc2ee74f71bc984454badd328fb553ebb59 /gcc/rust/Make-lang.in
parente42c28bcfdde1f81c4908c08ee5e2da6e1c4bd93 (diff)
downloadgcc-68d671ac725eb0937a892516906e300ad8a3c538.zip
gcc-68d671ac725eb0937a892516906e300ad8a3c538.tar.gz
gcc-68d671ac725eb0937a892516906e300ad8a3c538.tar.bz2
gccrs: Refactor the type unification code
This refactors the unification systems to be a consistent interface using switch statements and simple functions instead of the old clunky visitor system. This is more maintainable as it is harder to miss cases when we can take advantages of switch statements. Signed-off-by: Philip Herron <herron.philip@googlemail.com> gcc/rust/ChangeLog: * Make-lang.in: update names * backend/rust-compile-expr.cc (CompileExpr::resolve_method_address): update to use new interface * typecheck/rust-coercion.cc (TypeCoercionRules::coerce_borrowed_pointer): likewise * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::unify_site): likewise * typecheck/rust-tyty.cc (BaseType::destructure): likewise (InferType::unify): removed old unify interface (ErrorType::unify): likewise (ADTType::unify): likewise (TupleType::unify): likewise (FnType::unify): likewise (FnPtr::unify): likewise (ClosureType::unify): likewise (ArrayType::unify): likewise (SliceType::unify): likewise (BoolType::unify): likewise (IntType::unify): likewise (UintType::unify): likewise (FloatType::unify): likewise (USizeType::unify): likewise (ISizeType::unify): likewise (CharType::unify): likewise (ReferenceType::unify): likewise (PointerType::unify): likewise (ParamType::unify): likewise (StrType::unify): likewise (NeverType::unify): likewise (PlaceholderType::unify): likewise (ProjectionType::unify): likewise (DynamicObjectType::unify): likewise * typecheck/rust-tyty.h: update destructure interface * typecheck/rust-tyty-rules.h: Removed. * typecheck/rust-unify.cc: New file. * typecheck/rust-unify.h: New file. gcc/testsuite/ChangeLog: * rust/compile/never_type_err1.rs: Moved to... * rust/compile/never_type1.rs: ...here. It now works
Diffstat (limited to 'gcc/rust/Make-lang.in')
-rw-r--r--gcc/rust/Make-lang.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
index 4752bb8..1d2f34d 100644
--- a/gcc/rust/Make-lang.in
+++ b/gcc/rust/Make-lang.in
@@ -134,6 +134,7 @@ GRS_OBJS = \
rust/rust-hir-path-probe.o \
rust/rust-coercion.o \
rust/rust-casts.o \
+ rust/rust-unify.o \
rust/rust-hir-type-check-base.o \
rust/rust-autoderef.o \
rust/rust-substitution-mapper.o \