]> git.lizzy.rs Git - rust.git/commit
Use built-in comparisons for range matching in MIR.
authorScott Olson <scott@solson.me>
Wed, 30 Dec 2015 16:25:35 +0000 (10:25 -0600)
committerScott Olson <scott@solson.me>
Wed, 30 Dec 2015 16:25:41 +0000 (10:25 -0600)
commit8a834097cc179a4f5cd685230b92772d371c920f
treedcf9a3377f2b24fab310d07508559856b23c16d0
parent6e2a64b57a74f35bef215972adf1b803cff288bd
Use built-in comparisons for range matching in MIR.

The previous version using `PartialOrd::le` was broken since it passed `T`
arguments where `&T` was expected.

It makes sense to use primitive comparisons since range patterns can only be
used with chars and numeric types.
src/librustc_mir/build/matches/test.rs
src/librustc_mir/hair/cx/mod.rs