-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
derive Hash (and not Copy) for ranges #34180
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
r? @sfackler |
This could do with some tests. |
Is there a reason you've not included |
@ollie27 no, it was a mistake. On Thu, Jun 9, 2016 at 1:12 PM, Oliver Middleton notifications@github.com
|
And RangeInclusive is Copy! Oops! |
[breaking-change] due to the removal of Copy which shouldn't have been there in the first place, as per policy set forth in rust-lang#27186.
Tests are annoying because rustc won't continue past any error about |
Tests added. |
//~^^^^^^^^ ERROR binary operation | ||
//~^^^^^^^^^ ERROR binary operation | ||
//~^^^^^^^^^^ ERROR binary operation | ||
//~^^^^^^^^^^^ ERROR binary operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these errors duplicated so many times?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you file an issue about the bogus duplicate errors and add a FIXME here linking it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
On Jun 10, 2016 8:27 PM, "Brian Anderson" notifications@github.com wrote:
In src/test/compile-fail/range_traits-1.rs
#34180 (comment):+use std::ops::*;
+
+#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
+struct AllTheRanges {
- a: Range,
- //~^ ERROR PartialOrd
- //~^^ ERROR PartialOrd
- //~^^^ ERROR Ord
- //~^^^^ ERROR binary operation
- //~^^^^^ ERROR binary operation
- //~^^^^^^ ERROR binary operation
- //~^^^^^^^ ERROR binary operation
- //~^^^^^^^^ ERROR binary operation
- //~^^^^^^^^^ ERROR binary operation
- //~^^^^^^^^^^ ERROR binary operation
- //~^^^^^^^^^^^ ERROR binary operation
Can you file an issue about the bogus duplicate errors and add a FIXME
here linking it?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rust-lang/rust/pull/34180/files/53618c36292955b0c79e9ebc02df879015813851#r66696919,
or mute the thread
https://github.com/notifications/unsubscribe/AAC3n2zMYixNPrAmRjPg75o2A7BBa3b9ks5qKgEIgaJpZM4IyD3K
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brson done. |
@bors r+ |
📌 Commit df924ca has been approved by |
derive Hash (and not Copy) for ranges Fixes #34170. Also, `RangeInclusive` was `Copy` by mistake -- fix that, which is a [breaking-change] to that unstable type.
Fixes #34170.
Also,
RangeInclusive
wasCopy
by mistake -- fix that, which is a [breaking-change] to that unstable type.