Skip to content

Parse error for traits without parameter names #972

Closed
@Manishearth

Description

@Manishearth

Discovered in mozilla/cbindgen#665, breaks on https://github.com/japaric/cast.rs. Minimal example:

trait Foo {
    fn bar(i32) -> i32;
}
error: Syn unable to parse file
 --> test.rs:2:14
  |
2 |     fn bar(i32) -> i32;
  |               ^ expected `:`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions