Properly check constrainedness of gen params in the presence of weak alias types
This commit is contained in:
parent
8677d64c72
commit
fde4556785
9 changed files with 105 additions and 17 deletions
|
@ -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![]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue