-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Implement RFC 1268 "Allow overlapping implementations for marker traits" #41309
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
fd5d164
to
075b4ab
Compare
Considering @nikomatsakis already approved #40097 and all I did was rebase and add an unstable book entry, I hope I'm not overstepping my bounds just to do: @bors r=nikomatsakis |
📌 Commit 075b4ab has been approved by |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 075b4ab has been approved by |
🔒 Merge conflict |
☔ The latest upstream changes (presumably #41305) made this pull request unmergeable. Please resolve the merge conflicts. |
This patch allows overlap to occur between any two impls of a trait for traits which have no associated items. Several compile-fail tests around coherence had to be changed to add at least one item to the trait they test against. Ref rust-lang#29864
I've added some explicit tests that negative impls are allowed to overlap, and also to make sure that the feature doesn't interfere with specialization. I've not added an explicit test for positive overlapping with negative, as that's already tested elsewhere.
075b4ab
to
ae9f571
Compare
Rebased. @bors r=nikomatsakis |
📌 Commit ae9f571 has been approved by |
…ikomatsakis Implement RFC 1268. Rebased version of rust-lang#40097. Tracking issue: rust-lang#29864.
[meta] I've edited the PR name to include the RFC name. |
@frewsxcv thanks for adding the book entry! I've been hoping to get to that. |
Rebased version of #40097.
Tracking issue: #29864.