@@ -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<" );
@@ -1507,7 +1507,7 @@ bool ConverterRefCount::VisitImplicitCastExpr(clang::ImplicitCastExpr *expr) {
15071507 auto ptype = clang::dyn_cast<clang::PointerType>(expr->getType ());
15081508 auto pointee_type = ptype->getPointeeType ()->getAsCXXRecordDecl ();
15091509
1510- if (pointee_type && abstract_structs_. contains ( GetID ( pointee_type) )) {
1510+ if (pointee_type && IsAbstractUserClass ( pointee_type)) {
15111511 PushConversionKind push (*this , ConversionKind::Unboxed);
15121512 StrCat (std::format (" {}.to_dyn::<{}>(|w| w)" ,
15131513 ToString (sub_expr->IgnoreCasts ()),
@@ -3222,7 +3222,7 @@ void ConverterRefCount::ConvertArrow(clang::Expr *expr) {
32223222 auto pointee_type = expr->getType ()->getPointeeType ();
32233223 // Virtual methods, which take &mut self, are called through PtrDyn.
32243224 if (auto *record = pointee_type->getAsRecordDecl ();
3225- isLValue () && record && abstract_structs_. contains ( GetID ( record) )) {
3225+ isLValue () && record && IsAbstractUserClass ( record)) {
32263226 StrCat (std::format (" (*{}.upgrade().deref_mut())" , ToString (expr)));
32273227 SetValueFreshness (pointee_type);
32283228 return ;
0 commit comments