]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Set traits getter as member function
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Fri, 28 Jul 2023 15:55:55 +0000 (17:55 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:04:32 +0000 (19:04 +0100)
commitde8bc8f9bc03230f124802c4dd0a42f79796a770
treed999cb83bced9055bad0346d72dcd2f1b146981b
parentad1f51084946125ceb33a0086d42fac0f42460be
gccrs: Set traits getter as member function

This function will be used outside of the expand visitor, making it
easily accessible is therefore mandatory.

gcc/rust/ChangeLog:

* ast/rust-ast.cc (Attribute::get_traits_to_derive): Add
function as member function.
* ast/rust-ast.h: Add prototype.
* expand/rust-expand-visitor.cc (get_traits_to_derive): Remove
function.
(ExpandVisitor::expand_inner_stmts): Update function call.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast.cc
gcc/rust/ast/rust-ast.h
gcc/rust/expand/rust-expand-visitor.cc