Auto merge of #74717 - davidtwco:issue-74636-polymorphized-closures-inherited-params, r=oli-obk
mir: add `used_generic_parameters_needs_subst` Fixes #74636. This PR adds a `used_generic_parameters_needs_subst` helper function which checks whether a type needs substitution, but only for parameters that the `unused_generic_params` query considers used. This is used in the MIR interpreter to make the check for some pointer casts and for reflection intrinsics more precise. I've opened this as a draft PR because this might not be the approach we want to fix this issue and we have to decide what to do about the reflection case. r? @EddyB cc @lcnr @wesleywiser
Showing
想要评论请 注册 或 登录