try to evaluate in try_unify
This commit is contained in:
parent
d8e564715e
commit
47f78a2487
4 changed files with 68 additions and 37 deletions
|
@ -329,12 +329,12 @@ rustc_queries! {
|
|||
}
|
||||
}
|
||||
|
||||
query try_unify_abstract_consts(key: (
|
||||
ty::Unevaluated<'tcx, ()>, ty::Unevaluated<'tcx, ()>
|
||||
)) -> bool {
|
||||
query try_unify_abstract_consts(key:
|
||||
ty::ParamEnvAnd<'tcx, (ty::Unevaluated<'tcx, ()>, ty::Unevaluated<'tcx, ()>
|
||||
)>) -> bool {
|
||||
desc {
|
||||
|tcx| "trying to unify the generic constants {} and {}",
|
||||
tcx.def_path_str(key.0.def.did), tcx.def_path_str(key.1.def.did)
|
||||
tcx.def_path_str(key.value.0.def.did), tcx.def_path_str(key.value.1.def.did)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -585,7 +585,7 @@ pub fn super_relate_consts<'tcx, R: TypeRelation<'tcx>>(
|
|||
(ty::ConstKind::Unevaluated(au), ty::ConstKind::Unevaluated(bu))
|
||||
if tcx.features().generic_const_exprs =>
|
||||
{
|
||||
tcx.try_unify_abstract_consts((au.shrink(), bu.shrink()))
|
||||
tcx.try_unify_abstract_consts(relation.param_env().and((au.shrink(), bu.shrink())))
|
||||
}
|
||||
|
||||
// While this is slightly incorrect, it shouldn't matter for `min_const_generics`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue