serde/test_suite/tests/ui/borrow/struct_variant.rs

13 lines
179 B
Rust
Raw Normal View History

2018-12-31 20:36:59 -06:00
use serde_derive::Deserialize;
#[derive(Deserialize)]
struct Str<'a>(&'a str);
#[derive(Deserialize)]
enum Test<'a> {
2018-06-02 23:11:42 -05:00
#[serde(borrow)]
S { s: Str<'a> },
}
fn main() {}