@@ -274,7 +274,7 @@ bool ConverterRefCount::VisitConstantArrayType(clang::ConstantArrayType *type) {
274274
275275 switch (conv) {
276276 case ConversionKind::Unboxed:
277- StrCat (" [ " );
277+ StrCat (' [ ' );
278278 Convert (type->getElementType ());
279279 StrCat (std::format (" ; {}]" , GetNumAsString (type->getSize ()).c_str ()));
280280 break ;
@@ -445,7 +445,7 @@ void ConverterRefCount::AddCloneTrait(const clang::CXXRecordDecl *decl) {
445445
446446 auto record_name = GetRecordName (decl);
447447
448- StrCat (keyword::kImpl , " Clone for" , record_name, " { " );
448+ StrCat (keyword::kImpl , " Clone for" , record_name, ' { ' );
449449 StrCat (" fn clone(&self) -> Self {" );
450450
451451 for (auto ctor : decl->ctors ()) {
@@ -456,8 +456,8 @@ void ConverterRefCount::AddCloneTrait(const clang::CXXRecordDecl *decl) {
456456 }
457457 }
458458
459- StrCat (" } " );
460- StrCat (" } " );
459+ StrCat (' } ' );
460+ StrCat (' } ' );
461461}
462462
463463void ConverterRefCount::AddDefaultTrait (const clang::RecordDecl *decl) {
@@ -491,11 +491,11 @@ void ConverterRefCount::AddDropTrait(const clang::CXXRecordDecl *decl) {
491491
492492 auto record_name = GetRecordName (decl);
493493
494- StrCat (keyword::kImpl , " Drop for" , record_name, " { " );
494+ StrCat (keyword::kImpl , " Drop for" , record_name, ' { ' );
495495 StrCat (" fn drop(&mut self) {" );
496496 Convert (body);
497- StrCat (" } " );
498- StrCat (" } " );
497+ StrCat (' } ' );
498+ StrCat (' } ' );
499499}
500500
501501static bool recordImplementsByteRepr (const clang::RecordDecl *decl) {
@@ -687,7 +687,7 @@ bool ConverterRefCount::ConvertIncAndDec(clang::UnaryOperator *expr) {
687687 if (!pending_deref_.empty ()) {
688688 StrCat (pending_deref_.take (), " .with_mut(|__v| __v." , method, " ())" );
689689 } else {
690- StrCat (str, " . " , method, " ()" );
690+ StrCat (str, ' . ' , method, " ()" );
691691 }
692692 return true ;
693693}
@@ -946,7 +946,7 @@ void ConverterRefCount::ConvertPrintf(clang::CallExpr *expr) {
946946 if (types[j])
947947 StrCat (keyword::kAs , types[j++]);
948948 }
949- StrCat (" ) " );
949+ StrCat (' ) ' );
950950}
951951
952952bool ConverterRefCount::VisitCallExpr (clang::CallExpr *expr) {
@@ -1144,7 +1144,7 @@ bool ConverterRefCount::VisitImplicitCastExpr(clang::ImplicitCastExpr *expr) {
11441144void ConverterRefCount::EmitFnPtrCall (clang::Expr *callee) {
11451145 StrCat (" (*" );
11461146 Convert (callee);
1147- StrCat (" ) " );
1147+ StrCat (' ) ' );
11481148}
11491149
11501150void ConverterRefCount::ConvertFunctionToFunctionPointer (
@@ -1156,7 +1156,7 @@ void ConverterRefCount::ConvertFunctionToFunctionPointer(
11561156}
11571157
11581158void ConverterRefCount::ConvertEqualsNullPtr (clang::Expr *expr) {
1159- StrCat (" ( " );
1159+ StrCat (' ( ' );
11601160 Convert (expr);
11611161 StrCat (" ).is_null()" );
11621162}
@@ -1485,7 +1485,7 @@ bool ConverterRefCount::VisitCXXNewExpr(clang::CXXNewExpr *expr) {
14851485 expr->getInitializer ())) {
14861486 StrCat (" Ptr::alloc_array(" );
14871487 Convert (init);
1488- StrCat (" ) " );
1488+ StrCat (' ) ' );
14891489 } else {
14901490 auto array_size_as_string = ToString (*expr->getArraySize ());
14911491 auto alloc_type = expr->getAllocatedType ();
@@ -1505,7 +1505,7 @@ bool ConverterRefCount::VisitCXXNewExpr(clang::CXXNewExpr *expr) {
15051505 } else {
15061506 Convert (expr->getInitializer ());
15071507 }
1508- StrCat (" ) " );
1508+ StrCat (' ) ' );
15091509 }
15101510 computed_expr_type_ = ComputedExprType::FreshPointer;
15111511 return false ;
@@ -1540,7 +1540,7 @@ bool ConverterRefCount::VisitCXXForRangeStmtMap(clang::CXXForRangeStmt *stmt) {
15401540
15411541 StrCat (" 'loop_:" );
15421542 StrCat (keyword::kFor , loop_var_name, keyword::kIn , " RefcountMapIter::begin(" ,
1543- ConvertObject (stmt->getRangeInit ()), " ) " );
1543+ ConvertObject (stmt->getRangeInit ()), ' ) ' );
15441544 PushBrace brace (*this );
15451545
15461546 EmitByValueShadow (
@@ -1603,7 +1603,7 @@ bool ConverterRefCount::VisitCXXForRangeStmtString(
16031603 stmt->getLoopVariable ()->getType ().isConstQualified () ? " " : " mut" ,
16041604 loop_var_name, keyword::kIn , ConvertObject (stmt->getRangeInit ()));
16051605 StrCat (" .to_string_iterator() as StringIterator<" ,
1606- ToString (loop_var->getType ().getNonReferenceType ()), " > " );
1606+ ToString (loop_var->getType ().getNonReferenceType ()), ' > ' );
16071607
16081608 PushBrace brace (*this );
16091609
@@ -1688,7 +1688,7 @@ bool ConverterRefCount::VisitImplicitValueInitExpr(
16881688 if (clang::isa<clang::ConstantArrayType>(arr_ty)) {
16891689 StrCat (" Box::new(" );
16901690 Converter::VisitImplicitValueInitExpr (expr);
1691- StrCat (" ) " );
1691+ StrCat (' ) ' );
16921692 return false ;
16931693 }
16941694 }
@@ -1798,7 +1798,7 @@ void ConverterRefCount::ConvertVarInit(clang::QualType qual_type,
17981798 if (qual_type->isFunctionPointerType () && lambda->capture_size () == 0 ) {
17991799 StrCat (" FnPtr::new(" );
18001800 VisitLambdaExpr (lambda);
1801- StrCat (" ) " );
1801+ StrCat (' ) ' );
18021802 } else {
18031803 VisitLambdaExpr (lambda);
18041804 }
@@ -1866,7 +1866,7 @@ void ConverterRefCount::EmitSetOrAssign(clang::Expr *lhs,
18661866 auto lhs_str = ConvertLValue (lhs);
18671867 if (!pending_deref_.empty ()) {
18681868 auto ptr = pending_deref_.take ();
1869- StrCat (ptr, " .write(" , rhs, " ) " );
1869+ StrCat (ptr, " .write(" , rhs, ' ) ' );
18701870 } else {
18711871 StrCat (lhs_str, token::kAssign , rhs);
18721872 }
@@ -2039,7 +2039,7 @@ bool ConverterRefCount::ConvertCXXOperatorCallExpr(
20392039 }
20402040
20412041 if (is_inner_boxed && !isObject ()) {
2042- StrCat (" ( " );
2042+ StrCat (' ( ' );
20432043 }
20442044
20452045 PushConversionKind push (*this , ConversionKind::Unboxed);
0 commit comments