]> git.lizzy.rs Git - rust.git/commit
fix FIXME(#6449) in #[derive(PartialOrd, Ord)]
authorAlex Burka <aburka@seas.upenn.edu>
Mon, 7 Mar 2016 23:35:01 +0000 (18:35 -0500)
committerAlex Burka <aburka@seas.upenn.edu>
Mon, 14 Mar 2016 20:49:12 +0000 (16:49 -0400)
commit4982f913461a2a6dfbac8bace53961233322646a
tree81bf96f174bb70d35e57a673c8e7b749db67b3ac
parentd19f1b629918a556709e6b89a1929305db6449dc
fix FIXME(#6449) in #[derive(PartialOrd, Ord)]

This replaces some `if`s with `match`es. This was originally not possible
because using a global path in a match statement caused a "non-constant
path in constant expr" ICE. The issue is long since closed, though you still
hit it (as an error now, not an ICE) if you try to generate match patterns
using pat_lit(expr_path). But it works when constructing the patterns more
carefully.
src/libsyntax_ext/deriving/cmp/ord.rs
src/libsyntax_ext/deriving/cmp/partial_ord.rs