Skip to content

Commit 19fa68d

Browse files
sriganeshresphilberty
authored andcommitted
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>
1 parent daa2977 commit 19fa68d

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

gcc/rust/ast/rust-item.h

+6-7
Original file line numberDiff line numberDiff line change
@@ -3197,19 +3197,18 @@ class TraitImpl : public Impl
31973197
trait_path (std::move (trait_path)), impl_items (std::move (impl_items))
31983198
{}
31993199

3200-
// Helper constructor with a typepath
3200+
// Delegating constructor for TypePath
32013201
TraitImpl (TypePath trait_path, bool is_unsafe, bool has_exclam,
32023202
std::vector<std::unique_ptr<AssociatedItem>> impl_items,
32033203
std::vector<std::unique_ptr<GenericParam>> generic_params,
32043204
std::unique_ptr<Type> trait_type, WhereClause where_clause,
32053205
Visibility vis, std::vector<Attribute> inner_attrs,
32063206
std::vector<Attribute> outer_attrs, location_t locus)
3207-
: Impl (std::move (generic_params), std::move (trait_type),
3208-
std::move (where_clause), std::move (vis), std::move (inner_attrs),
3209-
std::move (outer_attrs), locus),
3210-
has_unsafe (is_unsafe), has_exclam (has_exclam),
3211-
trait_path (std::unique_ptr<TypePath> (new TypePath (trait_path))),
3212-
impl_items (std::move (impl_items))
3207+
: TraitImpl (std::unique_ptr<Path> (new TypePath (trait_path)), is_unsafe,
3208+
has_exclam, std::move (impl_items), std::move (generic_params),
3209+
std::move (trait_type), std::move (where_clause),
3210+
std::move (vis), std::move (inner_attrs),
3211+
std::move (outer_attrs), locus)
32133212
{}
32143213

32153214
// Copy constructor with vector clone

0 commit comments

Comments
 (0)