diff options
author | Jakub Dupak <dev@jakubdupak.com> | 2023-10-03 16:14:39 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 19:09:12 +0100 |
commit | 47b88c0338563537bbd77bed006abb383972339f (patch) | |
tree | b376b42b71d0f0389d3662c3edf5f8f26b85366a /gcc/rust/hir/tree/rust-hir-expr.h | |
parent | b2ad5eae79ab836ccf4e85a67fdf84f1ce9dbb25 (diff) | |
download | gcc-47b88c0338563537bbd77bed006abb383972339f.zip gcc-47b88c0338563537bbd77bed006abb383972339f.tar.gz gcc-47b88c0338563537bbd77bed006abb383972339f.tar.bz2 |
gccrs: TyTy: TyTy improved subclass casting and checking
Associate each subclass with its kind and create cast/match+cast
methods.
gcc/rust/ChangeLog:
* typecheck/rust-tyty.cc (InferType::InferType): Use static constant for kind information.
(ErrorType::ErrorType): Use static constant for kind information.
(TupleType::TupleType): Use static constant for kind information.
(BoolType::BoolType): Use static constant for kind information.
(IntType::IntType): Use static constant for kind information.
(UintType::UintType): Use static constant for kind information.
(FloatType::FloatType): Use static constant for kind information.
(USizeType::USizeType): Use static constant for kind information.
(ISizeType::ISizeType): Use static constant for kind information.
(CharType::CharType): Use static constant for kind information.
(ReferenceType::ReferenceType): Use static constant for kind information.
(PointerType::PointerType): Use static constant for kind information.
(ParamType::ParamType): Use static constant for kind information.
(StrType::StrType): Use static constant for kind information.
(NeverType::NeverType): Use static constant for kind information.
(PlaceholderType::PlaceholderType): Use static constant for kind information.
* typecheck/rust-tyty.h: Add static kind information to all TyTy classes.
Create safe cast and check methods.
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
Diffstat (limited to 'gcc/rust/hir/tree/rust-hir-expr.h')
0 files changed, 0 insertions, 0 deletions