Skip to content

Make empty arrays Copy #30131

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

Closed
wants to merge 4 commits into from
Closed

Conversation

tbu-
Copy link
Contributor

@tbu- tbu- commented Dec 1, 2015

This PR is based on #30130.

The relevant commit from this PR is tbu-@1769c98.

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

Can this just be folded into #30130? It seems pretty harmless.

Also why does this need a compiler change? Can this not just be a trait impl?

@tbu-
Copy link
Contributor Author

tbu- commented Dec 1, 2015

I'll put this into #30130.

@tbu- tbu- closed this Dec 1, 2015
@tbu- tbu- reopened this Dec 4, 2015
@tbu- tbu- force-pushed the pr_empty_array_copy branch from b19a133 to d56dc07 Compare December 4, 2015 09:38
@tbu- tbu- force-pushed the pr_empty_array_copy branch from d56dc07 to 1769c98 Compare December 4, 2015 09:39
@alexcrichton
Copy link
Member

To copy over my concerns from #30130, I was a little hesitant when I realized that other marker traits like Send and Sync could in theory also be implemented for [T; 0] with no restrictions on T, but they currently aren't either (a tad inconsistent).

I'm gonna tag this with T-libs so it comes up during triage and we can discuss.

@alexcrichton alexcrichton added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Dec 4, 2015
@tbu-
Copy link
Contributor Author

tbu- commented Dec 6, 2015

The difference to Send and Sync is that you can still force a struct containing a member that does not implement the trait to be Send or Sync anyway. You can't do the same for Copy.

@bors
Copy link
Collaborator

bors commented Dec 7, 2015

☔ The latest upstream changes (presumably #30247) made this pull request unmergeable. Please resolve the merge conflicts.

@aturon
Copy link
Member

aturon commented Jan 8, 2016

We discussed this in the libs team meeting this week, and would like to see a stronger rationale for making this change before we land it.

@alexcrichton alexcrichton removed the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Jan 13, 2016
@alexcrichton
Copy link
Member

Closing due to @aturon's previous comment.

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.

5 participants