aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-macro.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-macro.h')
-rw-r--r--gcc/rust/ast/rust-macro.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h
index 79d513f..e23be14 100644
--- a/gcc/rust/ast/rust-macro.h
+++ b/gcc/rust/ast/rust-macro.h
@@ -537,6 +537,7 @@ protected:
class MetaNameValueStr : public MetaItem
{
Identifier ident;
+ // NOTE: str stored without quotes
std::string str;
public:
@@ -544,7 +545,7 @@ public:
: ident (std::move (ident)), str (std::move (str))
{}
- std::string as_string () const override { return ident + " = " + str; }
+ std::string as_string () const override { return ident + " = \"" + str + "\""; }
void accept_vis (ASTVisitor &vis) override;