diff options
| author | bors <bors@rust-lang.org> | 2015-04-10 23:49:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-10 23:49:24 +0000 |
| commit | 93f7fe32d30b67baa6abf09c073c5862a978dc57 (patch) | |
| tree | 5b63cfec7a546fe3c190f8a6cfafc3118b903180 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | c897ac04e2ebda378fd9e38f6ec0878ae3a2baf7 (diff) | |
| parent | 05aaad114f343ab6d484aa193b99e221089f4a8b (diff) | |
| download | rust-93f7fe32d30b67baa6abf09c073c5862a978dc57.tar.gz rust-93f7fe32d30b67baa6abf09c073c5862a978dc57.zip | |
Auto merge of #24270 - pnkfelix:use-disr-val-for-derive-ord, r=brson
Use `discriminant_value` intrinsic for `derive(PartialOrd)`
[breaking-change]
This is a [breaking-change] because it can change the result of comparison operators when enum discriminants have been explicitly assigned. Notably in a case like:
```rust
#[derive(PartialOrd)]
enum E { A = 2, B = 1}
```
Under the old deriving, `A < B` held, because `A` came before `B` in the order of declaration. But now we use the ordering according to the provided values, and thus `A > B`. (However, this change is very unlikely to break much, if any, code, since the orderings themselves should all remain well-defined, total, etc.)
Fix #15523
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
