diff --git a/serde_derive/Cargo.toml b/serde_derive/Cargo.toml index 1897cb1a..46246bb6 100644 --- a/serde_derive/Cargo.toml +++ b/serde_derive/Cargo.toml @@ -24,7 +24,7 @@ proc-macro = true [dependencies] proc-macro2 = "1.0" quote = "1.0" -syn = "2.0.24" +syn = "2.0.25" [dev-dependencies] serde = { version = "1.0", path = "../serde" } diff --git a/serde_derive/src/internals/attr.rs b/serde_derive/src/internals/attr.rs index bff82191..42212a64 100644 --- a/serde_derive/src/internals/attr.rs +++ b/serde_derive/src/internals/attr.rs @@ -1418,6 +1418,13 @@ fn get_lit_str2( .. }) = value { + let suffix = lit.suffix(); + if !suffix.is_empty() { + cx.error_spanned_by( + lit, + format!("unexpected suffix `{}` on string literal", suffix), + ); + } Ok(Some(lit.clone())) } else { cx.error_spanned_by( diff --git a/serde_derive_internals/Cargo.toml b/serde_derive_internals/Cargo.toml index 703a43cb..eb084af6 100644 --- a/serde_derive_internals/Cargo.toml +++ b/serde_derive_internals/Cargo.toml @@ -17,7 +17,7 @@ path = "lib.rs" [dependencies] proc-macro2 = "1.0" quote = "1.0" -syn = { version = "2.0.24", default-features = false, features = ["clone-impls", "derive", "parsing", "printing"] } +syn = { version = "2.0.25", default-features = false, features = ["clone-impls", "derive", "parsing", "printing"] } [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"]