From 5373b8e66cc66e0691e60ec7a2ea633ca7e5a9d1 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Tue, 27 Jun 2023 14:03:16 +0200 Subject: [PATCH] gccrs: ast: Add explicit default copy constructor Add explicit default copy/move constructor to identifiers. gcc/rust/ChangeLog: * ast/rust-ast.h: Add default constructors. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index a4caee7237df..e097a21d1cf3 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -39,6 +39,11 @@ public: : ident (ident), node_id (Analysis::Mappings::get ()->get_next_node_id ()) {} + Identifier (const Identifier &) = default; + Identifier (Identifier &&) = default; + Identifier &operator= (const Identifier &) = default; + Identifier &operator= (Identifier &&) = default; + NodeId get_node_id () const { return node_id; } const std::string &as_string () const { return ident; } -- 2.47.2