aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-03-19 13:12:20 +0100
committerCohenArthur <arthur.cohen@embecosm.com>2024-03-19 15:28:36 +0000
commitb85dc7014c821466bb411a14b7f5d6de4077eae6 (patch)
treec9e617ebfdc158ec29d90e61dc539fb3c6f215b4
parentf4379ba00a3b986eb9e7147bbbf39ebbd95f0aa5 (diff)
downloadgcc-b85dc7014c821466bb411a14b7f5d6de4077eae6.zip
gcc-b85dc7014c821466bb411a14b7f5d6de4077eae6.tar.gz
gcc-b85dc7014c821466bb411a14b7f5d6de4077eae6.tar.bz2
macro: Use MacroInvocation's node_id in ExternalItem constructor.
gcc/rust/ChangeLog: * ast/rust-macro.h: Use proper node id instead of the one in the base Expr class - which is uninitialized.
-rw-r--r--gcc/rust/ast/rust-macro.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h
index 5b9ff3f..507e595 100644
--- a/gcc/rust/ast/rust-macro.h
+++ b/gcc/rust/ast/rust-macro.h
@@ -727,7 +727,7 @@ private:
{}
MacroInvocation (const MacroInvocation &other)
- : TraitItem (other.locus), ExternalItem (Expr::node_id),
+ : TraitItem (other.locus), ExternalItem (other.node_id),
outer_attrs (other.outer_attrs), locus (other.locus),
node_id (other.node_id), invoc_data (other.invoc_data),
is_semi_coloned (other.is_semi_coloned), kind (other.kind),