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

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

Closed
Sculas opened this issue Mar 22, 2024 · 0 comments · Fixed by #16927
Closed

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

Sculas opened this issue Mar 22, 2024 · 0 comments · Fixed by #16927
Labels
Broken Window Bugs / technical debt to be addressed immediately

Comments

@Sculas
Copy link
Contributor

Sculas commented Mar 22, 2024

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

@Sculas Sculas added the Broken Window Bugs / technical debt to be addressed immediately label Mar 22, 2024
bors added a commit that referenced this issue Mar 23, 2024
fix: Rename `func_like` to `FuncLike`

Should fix #16926. Please check the issue for more information.
@bors bors closed this as completed in 966d387 Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Broken Window Bugs / technical debt to be addressed immediately
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant