With https://github.com/nox/serde-none-group, the command cargo build --features syn-full fails while the command cargo build succeeds. The only difference is that the failing command enables the "full" feature of the crate syn from a proc macro.
The build failure is:
± cargo build --features syn-full
Compiling syn v2.0.2
Compiling serde_derive v1.0.157
Compiling another-proc-macro v0.1.67 (/Users/nox/src/serde-none-group/another-proc-macro)
Compiling serde v1.0.157
Compiling serde-none-group v0.1.0 (/Users/nox/src/serde-none-group)
error: expected serde crate attribute to be a string: `crate = "..."`
--> src/lib.rs:4:25
|
4 | #[serde(crate = $serde_path)]
| ^^^^^^^^^^^
...
9 | / bug_if_async_trait! {
10 | | "serde"
11 | | }
| |_- in this macro invocation
|
= note: this error originates in the macro `bug_if_async_trait` (in Nightly builds, run with -Z macro-backtrace for more info)
I've debugged it and the reason is that serde_derive sees a None-delimited group instead of a bare literal, but only when the "full" feature of syn is enabled.
With https://github.com/nox/serde-none-group, the command
cargo build --features syn-fullfails while the commandcargo buildsucceeds. The only difference is that the failing command enables the "full" feature of the cratesynfrom a proc macro.The build failure is:
I've debugged it and the reason is that serde_derive sees a None-delimited group instead of a bare literal, but only when the "full" feature of syn is enabled.