//! Test ensuring that default type params gets forwarded to Builder. #[macro_use] extern crate derive_builder; #[derive(Builder)] #[builder(setter(strip_option))] struct Settings U> { first: T, #[builder(default)] second: Option, #[builder(default)] third: Option, } fn main() { SettingsBuilder::::default() .first(1) .second(()) .third(|_: usize| ()) .build() .unwrap(); SettingsBuilder::::default() .first(1) .second(2) .third(|_: usize| 3) .build() .unwrap(); }