aboutsummaryrefslogtreecommitdiff
path: root/gcc/function-tests.cc
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2023-01-30 18:19:07 +0000
committerPhilip Herron <herron.philip@googlemail.com>2023-02-05 00:10:48 +0000
commit95fa967f5c5ce9445fa3f08195c01138338fd0bd (patch)
treeb7a4f37fa7910cbc9b5687e9f989974903b5874a /gcc/function-tests.cc
parentedcf5b63bf60c1aec18df315fffbcd3d59d23119 (diff)
downloadgcc-95fa967f5c5ce9445fa3f08195c01138338fd0bd.zip
gcc-95fa967f5c5ce9445fa3f08195c01138338fd0bd.tar.gz
gcc-95fa967f5c5ce9445fa3f08195c01138338fd0bd.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/function-tests.cc')
0 files changed, 0 insertions, 0 deletions