Skip to content

Commit 117ef22

Browse files
committed
Add ui test with suffixed string literals in attribute
1 parent 3fb5e71 commit 117ef22

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use serde::Serialize;
2+
3+
#[derive(Serialize)]
4+
#[serde(bound = ""huh)]
5+
pub struct Struct {
6+
#[serde(rename = ""what)]
7+
pub field: i32,
8+
}
9+
10+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error: unexpected suffix `huh` on string literal
2+
--> tests/ui/malformed/str_suffix.rs:4:17
3+
|
4+
4 | #[serde(bound = ""huh)]
5+
| ^^^^^
6+
7+
error: unexpected suffix `what` on string literal
8+
--> tests/ui/malformed/str_suffix.rs:6:22
9+
|
10+
6 | #[serde(rename = ""what)]
11+
| ^^^^^^

0 commit comments

Comments
 (0)