Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor callee data to store FnSig and associated info instead of ty::t #6273

Closed
nikomatsakis opened this issue May 6, 2013 · 4 comments
Closed
Labels
A-typesystem Area: The type system C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@nikomatsakis
Copy link
Contributor

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)

@huonw
Copy link
Member

huonw commented Sep 18, 2013

Triage: the FIXME is still there.

@jeremyletang
Copy link
Contributor

Triage: FIXME is still here

@nham
Copy link
Contributor

nham commented Aug 7, 2014

Triage: I believe this can be closed. I could not find any FIXME for this issue.

@steveklabnik
Copy link
Member

Closing, as i can't find it either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

5 participants