//@ aux-build:const_defaulty.rs //@ check-pass extern crate const_defaulty; use const_defaulty::Defaulted; struct Local; impl Local { fn new() -> Self { Local } } implLocal { fn value(&self) -> usize { N } } fn main() { let v = Defaulted::new(); assert_eq!(v.value(), 3); let l = Local::new(); assert_eq!(l.value(), 4); }