Skip to content

Commit aa38483

Browse files
authored
Rollup merge of #102133 - b-naber:use-valtrees-in-fast-reject, r=lcnr
Use valtrees for comparison r? `@lcnr`
2 parents b93c9a7 + e859425 commit aa38483

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

compiler/rustc_middle/src/ty/fast_reject.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -384,14 +384,7 @@ impl DeepRejectCtxt {
384384
// they might unify with any value.
385385
ty::ConstKind::Unevaluated(_) | ty::ConstKind::Error(_) => true,
386386
ty::ConstKind::Value(obl) => match k {
387-
ty::ConstKind::Value(imp) => {
388-
// FIXME(valtrees): Once we have valtrees, we can just
389-
// compare them directly here.
390-
match (obl.try_to_scalar_int(), imp.try_to_scalar_int()) {
391-
(Some(obl), Some(imp)) => obl == imp,
392-
_ => true,
393-
}
394-
}
387+
ty::ConstKind::Value(imp) => obl == imp,
395388
_ => true,
396389
},
397390

0 commit comments

Comments
 (0)