dtolnay / dtolnay/path-to-error
Does not work with flatten
Open
- Dominant language
- Rust
- Stars
- 425
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
```rust
#[test]
fn test_flattened_struct() {
#[derive(Deserialize, Debug)]
struct Package {
name: String,
#[serde(flatten)]
dependency: Dependency,
}
#[derive(Deserialize, Debug)]
struct Dependency {
version: String,
}
let j = r#"{
"name": "demo",
"version": 1
}"#;
// this doesn't work
test::(j, "version");
// this is the current result
// test::(j, ".");
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.