#![cfg(test)] #![allow(unused)] use default_variant::default; #[default(MY_CONST)] enum MyConst { One, Two, } impl MyConst { pub const MY_CONST: Self = Self::One; } #[test] fn associated_constant_default() { assert!(matches!(MyConst::default(), MyConst::One)); }