serde/test_suite/tests/ui/remote/nonremote_getter.rs

16 lines
180 B
Rust
Raw Normal View History

2018-12-31 20:36:59 -06:00
use serde_derive::Serialize;
#[derive(Serialize)]
struct S {
2018-06-02 23:11:42 -05:00
#[serde(getter = "S::get")]
a: u8,
}
impl S {
fn get(&self) -> u8 {
self.a
}
}
fn main() {}