Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gccrs: Made changes to AST::TraitImpl constructor for TypePath #3298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions gcc/rust/ast/rust-item.h
Original file line number Diff line number Diff line change
Expand Up @@ -3197,19 +3197,18 @@ class TraitImpl : public Impl
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
Expand Down
Loading