diff options
| author | bors <bors@rust-lang.org> | 2018-05-25 18:30:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-25 18:30:06 +0000 |
| commit | 827013a31b88e536e85b8e6ceb5b9988042ec335 (patch) | |
| tree | 2f4527603327f3996eb42813cae163caa0296f70 /src/librustc_mir/hair/pattern | |
| parent | a7756804103447ea4e68a71ccf071e7ad8f7a03e (diff) | |
| parent | b3785a31cdae1c164504db6da9c0f8fe6834d4c3 (diff) | |
| download | rust-1.26.1.tar.gz rust-1.26.1.zip | |
Auto merge of #51045 - Mark-Simulacrum:stable-point, r=alexcrichton 1.26.1
Stable point release (1.26.1) This includes all items on [the wishlist](https://github.com/rust-lang/rust/issues/50756), plus https://github.com/rust-lang/rust/pull/50694, which backported cleanly. The target date is May 29th, Tuesday next week. cc @rust-lang/compiler @oli-obk @eddyb -- I backported https://github.com/rust-lang/rust/pull/50812, but it wasn't a clean patch so review would be appreciated.
Diffstat (limited to 'src/librustc_mir/hair/pattern')
| -rw-r--r-- | src/librustc_mir/hair/pattern/mod.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/librustc_mir/hair/pattern/mod.rs b/src/librustc_mir/hair/pattern/mod.rs index 02aca73c553..6efef07ebbd 100644 --- a/src/librustc_mir/hair/pattern/mod.rs +++ b/src/librustc_mir/hair/pattern/mod.rs @@ -1115,7 +1115,12 @@ pub fn compare_const_vals<'a, 'tcx>( ty, }; // FIXME(oli-obk): report cmp errors? - l.try_cmp(r).ok() + // FIXME: Just returning Ordering::Greater here is the previous behavior but may + // not be what we want. It means that NaN > NaN is true, which if false. + match l.try_cmp(r) { + Ok(opt) => Some(opt.unwrap_or(Ordering::Greater)), + _ => None, + } }, ty::TyInt(_) => { let a = interpret::sign_extend(tcx, a, ty).expect("layout error for TyInt"); |
