Implement const effect predicate in new solver

This commit is contained in:
Michael Goulet 2024-10-20 19:49:11 +00:00
parent a16d491054
commit cde29b9ec9
127 changed files with 1702 additions and 1170 deletions

View file

@ -683,6 +683,24 @@ rustc_queries! {
}
}
query const_conditions(
key: DefId
) -> ty::ConstConditions<'tcx> {
desc { |tcx| "computing the conditions for `{}` to be considered const",
tcx.def_path_str(key)
}
separate_provide_extern
}
query implied_const_bounds(
key: DefId
) -> ty::EarlyBinder<'tcx, &'tcx [(ty::PolyTraitRef<'tcx>, Span)]> {
desc { |tcx| "computing the implied `~const` bounds for `{}`",
tcx.def_path_str(key)
}
separate_provide_extern
}
/// To avoid cycles within the predicates of a single item we compute
/// per-type-parameter predicates for resolving `T::AssocTy`.
query type_param_predicates(