Skip to content

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

Closed as not planned
Closed as not planned
@jendrikw

Description

@jendrikw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-save-analysisArea: saving results of analyses such as inference and borrowck results to a file.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions