aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSri Ganesh Thota <sriganeshthota12345@gmail.com>2024-12-10 18:38:27 +0530
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-21 12:55:43 +0100
commit6b27b7807545d985abde8a332c9f37e0d8657fb8 (patch)
treeacdc59a636e27d2223c95194407e891de6c7a8d5 /gcc
parent18d289ca2b1996aa76b902432941e88fa3497b6d (diff)
downloadgcc-6b27b7807545d985abde8a332c9f37e0d8657fb8.zip
gcc-6b27b7807545d985abde8a332c9f37e0d8657fb8.tar.gz
gcc-6b27b7807545d985abde8a332c9f37e0d8657fb8.tar.bz2
gccrs: Made changes to AST::TraitImpl constructor for TypePath
gcc/rust/ChangeLog: * ast/rust-item.h: I have changed helper constructor for typepath to be a delegating constructor. Signed-off-by: Sri Ganesh Thota <sriganeshthota12345@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/ast/rust-item.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index dca4aab..6b77449 100644
--- a/gcc/rust/ast/rust-item.h
+++ b/gcc/rust/ast/rust-item.h
@@ -3197,19 +3197,18 @@ public:
trait_path (std::move (trait_path)), impl_items (std::move (impl_items))
{}
- // Helper constructor with a typepath
+ // Delegating constructor for TypePath
TraitImpl (TypePath trait_path, bool is_unsafe, bool has_exclam,
std::vector<std::unique_ptr<AssociatedItem>> impl_items,
std::vector<std::unique_ptr<GenericParam>> generic_params,
std::unique_ptr<Type> trait_type, WhereClause where_clause,
Visibility vis, std::vector<Attribute> inner_attrs,
std::vector<Attribute> outer_attrs, location_t locus)
- : Impl (std::move (generic_params), std::move (trait_type),
- std::move (where_clause), std::move (vis), std::move (inner_attrs),
- std::move (outer_attrs), locus),
- has_unsafe (is_unsafe), has_exclam (has_exclam),
- trait_path (std::unique_ptr<TypePath> (new TypePath (trait_path))),
- impl_items (std::move (impl_items))
+ : TraitImpl (std::unique_ptr<Path> (new TypePath (trait_path)), is_unsafe,
+ has_exclam, std::move (impl_items), std::move (generic_params),
+ std::move (trait_type), std::move (where_clause),
+ std::move (vis), std::move (inner_attrs),
+ std::move (outer_attrs), locus)
{}
// Copy constructor with vector clone