Skip to content

Conversation

@powerboat9
Copy link
Collaborator

Also removes some redundant copies and improves TypePath copying.

This should prevent the compiler from ICE-ing before it hits the lowering phase.

Also removes some redundant copies and improves TypePath copying.

gcc/rust/ChangeLog:

	* ast/rust-ast-builder.cc (Builder::trait_bound): Replace copy
	with move.
	(Builder::trait_impl): Likewise.
	(Builder::new_const_param): Replace cloning with reconstruction.
	* ast/rust-path.h (TypePath::TypePath): Use TypeNoBounds copy
	constructor.
	(TypePath::operator=): Use TypeNoBounds copy assignment.
	* expand/rust-derive-clone.cc (DeriveClone::clone_impl): Produce
	trait bounds lazily.
	* expand/rust-derive-copy.cc (DeriveCopy::copy_impl): Likewise.
	* expand/rust-derive-debug.cc (DeriveDebug::stub_derive_impl):
	Likewise.
	* expand/rust-derive-default.cc (DeriveDefault::default_impl):
	Likewise.
	* expand/rust-derive-eq.cc (DeriveEq::eq_impls): Likewise.
	* expand/rust-derive-hash.cc (DeriveHash::hash_impl): Likewise.
	* expand/rust-derive-ord.cc (DeriveOrd::cmp_impl): Likewise.
	* expand/rust-derive-partial-eq.cc
	(DerivePartialEq::partialeq_impls): Likewise.
	* expand/rust-derive.cc (DeriveVisitor::setup_impl_generics):
	Likewise.
	* expand/rust-derive.h (DeriveVisitor::setup_impl_generics):
	Likewise.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants