You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
warning: cannot use constants which depend on generic parameters in types
--> src/slices/mod.rs:48:20
|
48 | type NARR: $trait_name<'a, T, $narr_size>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
= note: `#[warn(const_evaluatable_unchecked)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
Can't workaround with helper const value-generating macros:
/// Used for `NARR` associative types only. Purpose: When `disable_empty_arrays` feature is enabled, this makes `NARR` not be an array with 0 items (which would fail), but with one item.#[cfg(not(feature = "disable_empty_arrays"))]macro_rules! non_array_size {() => {0usize};}#[cfg(feature = "disable_empty_arrays")]macro_rules! non_array_size {() => {1usize};}//...// inside the owner trait:typeNARR: $trait_name<'a,T,non_array_size!()>;
Of course, everything here is on Nightly Rust:
https://github.com/ranging-rs/slicing-rs/blob/main/src/slices/mod.rs#L48=
The text was updated successfully, but these errors were encountered: