serde/serde_derive/tests/compile-fail/str_ref_deser.rs

12 lines
262 B
Rust
Raw Normal View History

2016-09-28 11:55:54 -05:00
#![feature(rustc_macro)]
#[macro_use]
extern crate serde_derive;
#[derive(Serialize, Deserialize)] //~ ERROR: custom derive attribute panicked
struct Test<'a> {
s: &'a str, // ERROR: Serde does not support deserializing fields of type &str
}
fn main() {}