1
Fork 0

Remove associated type based effects logic

This commit is contained in:
Michael Goulet 2024-10-20 20:22:11 +00:00
parent 8aca4bab08
commit a16d491054
73 changed files with 85 additions and 1519 deletions

View file

@ -58,15 +58,9 @@ fn equate_intrinsic_type<'tcx>(
// the host effect param should be invisible as it shouldn't matter
// whether effects is enabled for the intrinsic provider crate.
let consts_count = if generics.host_effect_index.is_some() {
own_counts.consts - 1
} else {
own_counts.consts
};
if gen_count_ok(own_counts.lifetimes, n_lts, "lifetime")
&& gen_count_ok(own_counts.types, n_tps, "type")
&& gen_count_ok(consts_count, n_cts, "const")
&& gen_count_ok(own_counts.consts, n_cts, "const")
{
let _ = check_function_signature(
tcx,

View file

@ -913,12 +913,7 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) -> Result<(),
hir::GenericParamKind::Lifetime { .. } | hir::GenericParamKind::Type { .. } => Ok(()),
// Const parameters are well formed if their type is structural match.
hir::GenericParamKind::Const {
ty: hir_ty,
default: _,
is_host_effect: _,
synthetic: _,
} => {
hir::GenericParamKind::Const { ty: hir_ty, default: _, synthetic: _ } => {
let ty = tcx.type_of(param.def_id).instantiate_identity();
if tcx.features().unsized_const_params() {