Skip to content

Use Chalk's built-in representations for fn items and pointers #4575

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

Merged
merged 2 commits into from
May 23, 2020

Conversation

flodiebold
Copy link
Member

The TypeName::FnDef was just added; the function pointer variant has existed for a while, I just forgot about it because it's special (because fn pointers can be higher-ranked over lifetimes).

We could also make FnPtr a separate Ty variant instead of a TypeCtor variant, which would make the conversion code a bit less special-casey, but it doesn't seem worth doing right now.

Function pointers can be 'higher-ranked' over lifetimes, which is why they're
not an application type in Chalk, but since we don't model lifetimes it doesn't
matter for us yet.
@flodiebold flodiebold requested a review from matklad May 22, 2020 19:09
@matklad
Copy link
Member

matklad commented May 23, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented May 23, 2020

@bors bors bot merged commit 4cc2ff6 into rust-lang:master May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants