Rollup merge of #102133 - b-naber:use-valtrees-in-fast-reject, r=lcnr
Use valtrees for comparison r? `@lcnr`
This commit is contained in:
commit
aa384834d7
1 changed files with 1 additions and 8 deletions
|
@ -384,14 +384,7 @@ impl DeepRejectCtxt {
|
||||||
// they might unify with any value.
|
// they might unify with any value.
|
||||||
ty::ConstKind::Unevaluated(_) | ty::ConstKind::Error(_) => true,
|
ty::ConstKind::Unevaluated(_) | ty::ConstKind::Error(_) => true,
|
||||||
ty::ConstKind::Value(obl) => match k {
|
ty::ConstKind::Value(obl) => match k {
|
||||||
ty::ConstKind::Value(imp) => {
|
ty::ConstKind::Value(imp) => obl == 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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ => true,
|
_ => true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue