@@ -341,7 +341,7 @@ bool ConverterRefCount::VisitPointerType(clang::PointerType *type) {
341341 PushConversionKind push2 (*this , ConversionKind::FullRefCount,
342342 pointee_is_array);
343343 if (pointee_type->isRecordType () &&
344- abstract_structs_. contains ( GetID ( pointee_type->getAsRecordDecl () ))) {
344+ IsAbstractUserClass ( pointee_type->getAsRecordDecl ())) {
345345 StrCat (" PtrDyn<dyn" );
346346 } else {
347347 StrCat (" Ptr<" );
@@ -1499,7 +1499,7 @@ bool ConverterRefCount::VisitImplicitCastExpr(clang::ImplicitCastExpr *expr) {
14991499 auto ptype = clang::dyn_cast<clang::PointerType>(expr->getType ());
15001500 auto pointee_type = ptype->getPointeeType ()->getAsCXXRecordDecl ();
15011501
1502- if (pointee_type && abstract_structs_. contains ( GetID ( pointee_type) )) {
1502+ if (pointee_type && IsAbstractUserClass ( pointee_type)) {
15031503 PushConversionKind push (*this , ConversionKind::Unboxed);
15041504 StrCat (std::format (" {}.to_dyn::<{}>(|w| w)" ,
15051505 ToString (sub_expr->IgnoreCasts ()),
@@ -3214,7 +3214,7 @@ void ConverterRefCount::ConvertArrow(clang::Expr *expr) {
32143214 auto pointee_type = expr->getType ()->getPointeeType ();
32153215 // Virtual methods, which take &mut self, are called through PtrDyn.
32163216 if (auto *record = pointee_type->getAsRecordDecl ();
3217- isLValue () && record && abstract_structs_. contains ( GetID ( record) )) {
3217+ isLValue () && record && IsAbstractUserClass ( record)) {
32183218 StrCat (std::format (" (*{}.upgrade().deref_mut())" , ToString (expr)));
32193219 SetValueFreshness (pointee_type);
32203220 return ;
0 commit comments