mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-14 03:31:02 +00:00
Add ui test with suffixed string literals in attribute
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
use serde::Serialize;
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
#[serde(bound = ""huh)]
|
||||||
|
pub struct Struct {
|
||||||
|
#[serde(rename = ""what)]
|
||||||
|
pub field: i32,
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
error: unexpected suffix `huh` on string literal
|
||||||
|
--> tests/ui/malformed/str_suffix.rs:4:17
|
||||||
|
|
|
||||||
|
4 | #[serde(bound = ""huh)]
|
||||||
|
| ^^^^^
|
||||||
|
|
||||||
|
error: unexpected suffix `what` on string literal
|
||||||
|
--> tests/ui/malformed/str_suffix.rs:6:22
|
||||||
|
|
|
||||||
|
6 | #[serde(rename = ""what)]
|
||||||
|
| ^^^^^^
|
||||||
Reference in New Issue
Block a user