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

Why does save-analysis use it's own syntax? #57136

Closed
jendrikw opened this issue Dec 26, 2018 · 6 comments
Closed

Why does save-analysis use it's own syntax? #57136

jendrikw opened this issue Dec 26, 2018 · 6 comments
Labels
A-save-analysis Area: saving results of analyses such as inference and borrowck results to a file. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jendrikw
Copy link
Contributor

jendrikw commented Dec 26, 2018

In the save-analysis file of liballoc, the value/signature of

pub unsafe fn local_waker<W: Wake + 'static>(wake: Arc<W>) -> LocalWaker {
looks like this: fn <W> (wake: Arc<W>) -> LocalWaker, which is not valid rust code.

There is little documentation available for the save-analysis, but as far as I understood it, the value field is supposed to represent the signature. In most other languages, the signature of a function doesn't include the parameter names.

For consistency, I think it would be better if the field would either include the function name or leave of the parameter names.

Edit: I want this to be able to parse the string with syn, which expects either a name for the function or no names for the arguments.

@csmoe
Copy link
Member

csmoe commented Dec 27, 2018

fn local_waker<W>(wake: Arc<W>) -> LocalWaker

it's valid generic function, cc https://doc.rust-lang.org/reference/items/functions.html#generic-functions

@csmoe csmoe closed this as completed Dec 27, 2018
@jendrikw
Copy link
Contributor Author

I know, but the function name local_waker is missing from the string, so it's impossible to parse it.

@csmoe
Copy link
Member

csmoe commented Dec 27, 2018

@jendrikw oops, I misunderstood your comments, sorry.

@csmoe csmoe reopened this Dec 27, 2018
@Centril Centril added the A-save-analysis Area: saving results of analyses such as inference and borrowck results to a file. label Dec 28, 2018
@steveklabnik
Copy link
Member

Triage: a long time later, save-analysis is eventually on the way out, and so this might just be moot.

@steveklabnik steveklabnik added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 21, 2020
@marmeladema
Copy link
Contributor

I think its been fixed by #73155 at least for function signature as this issue is about. I can probably be closed.
cc @Xanewok

@jyn514
Copy link
Member

jyn514 commented Feb 19, 2023

Save-analysis has been removed from the compiler.

@jyn514 jyn514 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-save-analysis Area: saving results of analyses such as inference and borrowck results to a file. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants