Implement const effect predicate in new solver
This commit is contained in:
parent
a16d491054
commit
cde29b9ec9
127 changed files with 1702 additions and 1170 deletions
|
@ -150,6 +150,15 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> {
|
|||
});
|
||||
}
|
||||
|
||||
// We extend the param-env of our item with the const conditions of the item,
|
||||
// since we're allowed to assume `~const` bounds hold within the item itself.
|
||||
predicates.extend(
|
||||
tcx.const_conditions(def_id)
|
||||
.instantiate_identity(tcx)
|
||||
.into_iter()
|
||||
.map(|(trait_ref, _)| trait_ref.to_host_effect_clause(tcx, ty::HostPolarity::Maybe)),
|
||||
);
|
||||
|
||||
let local_did = def_id.as_local();
|
||||
|
||||
let unnormalized_env =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue