We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 167627e commit 05258a5Copy full SHA for 05258a5
1 file changed
cpp2rust/converter/converter.cpp
@@ -1987,9 +1987,10 @@ bool Converter::VisitImplicitCastExpr(clang::ImplicitCastExpr *expr) {
1987
break;
1988
}
1989
if (IsGlobalVar(sub_expr)) {
1990
- StrCat("(&raw", dest_pointee_const ? keyword::kConst : keyword_mut_);
+ PushParen paren(*this);
1991
+ StrCat("&raw", dest_pointee_const ? keyword::kConst : keyword_mut_);
1992
Convert(sub_expr);
- StrCat(").cast::<",
1993
+ StrCat(".cast::<",
1994
GetUnsafeTypeAsString(expr->getType()->getPointeeType()), ">()");
1995
} else {
1996
0 commit comments