Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

#[derive(Encode)] and friends break on structs with default generic arguments #537

@bitwiseshiftleft

Description

@bitwiseshiftleft

I'm testing against 2.0.0-rc.1.

The derive macros cause syntax errors when given a struct with a default generic argument, such as:

#[derive(Encode)]
struct Foo<Bar=Baz> {}

This produces the following error:

error: Invalid rust syntax, expected ', > or an ident, got Some(Punct { ch: '=', spacing: Alone, span: #0 bytes(104880..104881) })
  --> src/xxx.rs:87:15
   |
87 | struct Foo<Bar=Baz> {}

(I tested this in some project, so there is an unhelpful line number.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions