syn
syn copied to clipboard
Parse default values in fields
- RFC: https://github.com/rust-lang/rfcs/pull/3681
- Tracking issue: https://github.com/rust-lang/rust/issues/132162
- Feature gate:
#![feature(default_field_values)]
#[derive(Default)]
struct Pet {
name: Option<String>,
age: i128 = 42,
// ^^^^
}