Skip to content

Implement Clone for tuples - #5692

Closed
Aatch wants to merge 1 commit into
rust-lang:incomingfrom
Aatch:tuple-clone
Closed

Implement Clone for tuples#5692
Aatch wants to merge 1 commit into
rust-lang:incomingfrom
Aatch:tuple-clone

Conversation

@Aatch

@AatchAatch commented Apr 3, 2013

Copy link
Copy Markdown
Contributor

This implements the clone interface for tuples and adds a test to match. The implementation is only on tuples that have elements that are themselves clone-able. This should allow for `#[deriving(Clone)] on nominal types that contain tuples somewhere.

Comment threadsrc/libcore/tuple.rs

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you use let (ref a, ref b) = *self here? or does that hit something like an ICE?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. #3874 and #3235 (mainly the latter).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, presumably, #5689, which for all I know might be a subset of one of those.

bors added a commit that referenced this pull request Apr 3, 2013
This implements the clone interface for tuples and adds a test to match. The implementation is only on tuples that have elements that are themselves clone-able. This should allow for `#[deriving(Clone)] on nominal types that contain tuples somewhere.
@borsbors closed this Apr 3, 2013
tesuji pushed a commit to tesuji/rustc that referenced this pull request Jun 9, 2020
reversed_empty_ranges: avoid linting N..N except in for loop arguments
changelog: [`reversed_empty_ranges`]: avoid linting N..N except in for loop arguments
r? @yaahcFixesrust-lang#5689
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
5692: Add support for extern crate r=jonas-schievink a=Nashenas88
This adds syntax highlighting, hover and goto def functionality for extern crate.
Fixesrust-lang#5690 Co-authored-by: Paul Daniel Faria <Nashenas88@users.noreply.github.com>
Sign up for freeto 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.

5 participants

@Aatch@bstrie@huonw@thestinger@bors