Refactor callee data to store FnSig and associated info instead of ty::t #6273
Labels
A-type-system
Area: Type system
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
Right now we store a
ty::t
with the callee id for a call that will contain the type of the callee. But this is not really the right thing---it is both too narrow and too general.Too narrow because it doesn't store all the information one might want about a callsite. So we wind up needing things like the method_map. Too general because callees must have function types (except for methods, but maybe they will eventually have bare fn types too)---so there is no reason to use a
ty::t
, which could store any type at all.As a side-effect of this, there is a FIXME in the code that relates to the fact that the ty::t we store for simple functions is the bare function before we have substituted the regions and the ty::t we store for methods is afterwards. The method code is correct, the type of the callee should include the concrete regions, but it is inconvenient to do so for functions. I've worked around this for now in regionck and elsewhere by not examining the type of the callee.
@erickt was doing some work on this.
cc #5074 (though not precisely a dependency)
The text was updated successfully, but these errors were encountered: