diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-02-08 14:08:58 +0100 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2024-02-17 08:39:01 +0100 |
| commit | fde4556785ac5e07302a48fcea7ead71e711d5f4 (patch) | |
| tree | 96e05a340e3445cff7e78e49af54a6f92c1ce215 /compiler/rustc_hir_analysis/src/impl_wf_check.rs | |
| parent | 8677d64c724e30453e321b8022fb6495dc0f4129 (diff) | |
| download | rust-fde4556785ac5e07302a48fcea7ead71e711d5f4.tar.gz rust-fde4556785ac5e07302a48fcea7ead71e711d5f4.zip | |
Properly check constrainedness of gen params in the presence of weak alias types
Diffstat (limited to 'compiler/rustc_hir_analysis/src/impl_wf_check.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/impl_wf_check.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/impl_wf_check.rs b/compiler/rustc_hir_analysis/src/impl_wf_check.rs index c072891e295..b4cec1d9882 100644 --- a/compiler/rustc_hir_analysis/src/impl_wf_check.rs +++ b/compiler/rustc_hir_analysis/src/impl_wf_check.rs @@ -94,7 +94,7 @@ fn enforce_impl_params_are_constrained( let impl_predicates = tcx.predicates_of(impl_def_id); let impl_trait_ref = tcx.impl_trait_ref(impl_def_id).map(ty::EarlyBinder::instantiate_identity); - let mut input_parameters = cgp::parameters_for_impl(impl_self_ty, impl_trait_ref); + let mut input_parameters = cgp::parameters_for_impl(tcx, impl_self_ty, impl_trait_ref); cgp::identify_constrained_generic_params( tcx, impl_predicates, @@ -111,7 +111,7 @@ fn enforce_impl_params_are_constrained( match item.kind { ty::AssocKind::Type => { if item.defaultness(tcx).has_value() { - cgp::parameters_for(&tcx.type_of(def_id).instantiate_identity(), true) + cgp::parameters_for(tcx, &tcx.type_of(def_id).instantiate_identity(), true) } else { vec![] } |
