Closed giann closed 5 years ago
Can lazy-static be built with cargo stable? I'm getting the following errors:
error: const fns are an unstable feature --> src/inline_lazy.rs:20:33 | 20 | pub const INIT: Self = Lazy(Cell::new(None), ONCE_INIT); | ^^^^^^^^^^^^^^^ | = help: in Nightly builds, add `#![feature(const_fn)]` to the crate attributes to enable error[E0493]: constants are not allowed to have destructors --> src/inline_lazy.rs:20:33 | 20 | pub const INIT: Self = Lazy(Cell::new(None), ONCE_INIT); | ^^^^^^^^^^^^^^^ constants cannot have destructors error[E0493]: constants are not allowed to have destructors --> src/inline_lazy.rs:20:28 | 20 | pub const INIT: Self = Lazy(Cell::new(None), ONCE_INIT); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constants cannot have destructors
I'm completely new to Rust so forgive me if I missed something obvious.
Nevermind I had an old version of Rust
Can lazy-static be built with cargo stable? I'm getting the following errors:
I'm completely new to Rust so forgive me if I missed something obvious.