Closed Rayzeq closed 1 year ago
In the example in the doc there is this function:
impl Flag { pub fn new(short: char, name: &'static str) -> Self { Flag { short, name } } }
But it fail compiling with this error: error[E0015]: cannot call non-const fn 'Flag::new' in statics. The example file works fine because it uses const fn new
error[E0015]: cannot call non-const fn 'Flag::new' in statics
const fn new
In the example in the doc there is this function:
But it fail compiling with this error:
error[E0015]: cannot call non-const fn 'Flag::new' in statics
. The example file works fine because it usesconst fn new