Skip to content

FuncLike proc-macro expansion no longer works due to improper rename #16926

Closed
@Sculas

Description

@Sculas

Commit 8e324e9 renamed the FuncLike kind to Bang and added an alias for backward-compatibility called func_like, while it should be FuncLike. This currently causes the following error in my project when using #[tokio::main]:

proc macro `main` not expanded: failed to read response: unknown variant `FuncLike`, expected one of `CustomDerive`, `Attr`, `func_like` at line 1 column 178

Minimal reproducible example (really):

// cargo add tokio -F full
#[tokio::main]
async fn main() {}

The following lines cause this:

// This used to be called FuncLike, so that's what the server expects currently.
#[serde(alias = "bang")]
#[serde(rename(serialize = "func_like", deserialize = "func_like"))]
Bang,

A simple fix should just be to rename it to FuncLike:

-    #[serde(rename(serialize = "func_like", deserialize = "func_like"))]
+    #[serde(rename(serialize = "FuncLike", deserialize = "FuncLike"))]

I'll try to PR a fix. edit: #16927

Metadata

Metadata

Assignees

No one assigned

    Labels

    Broken WindowBugs / technical debt to be addressed immediately

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions