aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve
diff options
context:
space:
mode:
authorJakub Dupak <dev@jakubdupak.com>2023-10-03 16:14:39 +0200
committerPhilip Herron <philip.herron@embecosm.com>2023-10-16 15:26:00 +0000
commite3fcc884cffd4828d644d67d15a31af39a4e142c (patch)
tree14d5483fba5738829b6234da5be66ae240ba2aea /gcc/rust/resolve
parent522528bce9925003009018954bdcaea45079dd79 (diff)
downloadgcc-e3fcc884cffd4828d644d67d15a31af39a4e142c.zip
gcc-e3fcc884cffd4828d644d67d15a31af39a4e142c.tar.gz
gcc-e3fcc884cffd4828d644d67d15a31af39a4e142c.tar.bz2
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/resolve')
0 files changed, 0 insertions, 0 deletions