Skip to content

Commit

Permalink
macro: Use MacroInvocation's node_id in ExternalItem constructor.
Browse files Browse the repository at this point in the history
gcc/rust/ChangeLog:

	* ast/rust-macro.h: Use proper node id instead of the one in the base
	Expr class - which is uninitialized.
  • Loading branch information
CohenArthur committed Mar 19, 2024
1 parent f4379ba commit b85dc70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcc/rust/ast/rust-macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ class MacroInvocation : public TypeNoBounds,
{}

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),
Expand Down

0 comments on commit b85dc70

Please sign in to comment.