Instantiate body instead of using ParamTypeMapper #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
follow-up of #8 for #10
Translating
ParamTyin TypeBuilder (viaParamTypeMapper) is insufficient for resolving traits in #10 because the actualGenericArgsare unknown when typing function calls.In the call to
genericwithin the following example, def_ty_with_args attempts to checkgenericusing int as a type argument (note: this is not i32, as it is already converted to rty::Type). However, BasicBlockAnalyzer unable to find the DefId of<i32 as Trait>::tbecause it only knows that T=int, but does not know T=i32, making it impossible to use Instance::resolve with fully substituted type arguments (i32 here).