about summary refs log tree commit diff
diff options
context:
space:
mode:
authorb-naber <bn263@gmx.de>2022-09-22 12:49:04 +0200
committerb-naber <bn263@gmx.de>2022-09-22 13:10:53 +0200
commite8594257f691a1e4e960f1dbb5dd92146fe9d978 (patch)
tree21c512ba862f034f2d3de1dd53de934c9899ad86
parent3e50038a2d4029bd1484af75dbf144c4b0da6c74 (diff)
downloadrust-e8594257f691a1e4e960f1dbb5dd92146fe9d978.tar.gz
rust-e8594257f691a1e4e960f1dbb5dd92146fe9d978.zip
use valtrees for comparison
-rw-r--r--compiler/rustc_middle/src/ty/fast_reject.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/ty/fast_reject.rs b/compiler/rustc_middle/src/ty/fast_reject.rs
index 8d019a3bad8..41bb3c71401 100644
--- a/compiler/rustc_middle/src/ty/fast_reject.rs
+++ b/compiler/rustc_middle/src/ty/fast_reject.rs
@@ -384,14 +384,7 @@ impl DeepRejectCtxt {
             // they might unify with any value.
             ty::ConstKind::Unevaluated(_) | ty::ConstKind::Error(_) => true,
             ty::ConstKind::Value(obl) => match k {
-                ty::ConstKind::Value(imp) => {
-                    // FIXME(valtrees): Once we have valtrees, we can just
-                    // compare them directly here.
-                    match (obl.try_to_scalar_int(), imp.try_to_scalar_int()) {
-                        (Some(obl), Some(imp)) => obl == imp,
-                        _ => true,
-                    }
-                }
+                ty::ConstKind::Value(imp) => obl == imp,
                 _ => true,
             },