aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/rust-hir-dump.cc
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-07-31 12:31:58 +0200
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2023-09-05 14:05:36 +0000
commit7cfad27662370008db7fa1dd1e2635d02ca312a9 (patch)
tree7a38427c61fee07dcfe47ef686ef58a5dad88b4f /gcc/rust/hir/rust-hir-dump.cc
parent133d96c3756c4b4d13533d28845baedbd633f8f0 (diff)
downloadgcc-7cfad27662370008db7fa1dd1e2635d02ca312a9.zip
gcc-7cfad27662370008db7fa1dd1e2635d02ca312a9.tar.gz
gcc-7cfad27662370008db7fa1dd1e2635d02ca312a9.tar.bz2
Change trait getter to return references
Having copy and any other constructor stuff might lead to a breakage in the future where the node id differs due to a newly constructed SimplePath node. This change will allow us to assert the NodeId is from the ast and not any copy made in between. gcc/rust/ChangeLog: * ast/rust-ast.cc (Attribute::get_traits_to_derive): Change return type to a vector of references. * ast/rust-ast.h: Update constructor. * expand/rust-expand-visitor.cc (ExpandVisitor::expand_inner_stmts): Update function call. Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/hir/rust-hir-dump.cc')
0 files changed, 0 insertions, 0 deletions