Trying to use the hex_color! macro gives the following error:
error[E0433]: failed to resolve: use of undeclared crate or module `color_hex`
--> src\main.rs:29:61
|
29 | let frame = egui::containers::Frame::default().fill(hex_color!("#ffffff"));
| ^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `color_hex`
|
= note: this error originates in the macro `hex_color` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0433`.
From what I can tell, the macro calls another macro from the color_hex crate, but there's no guarantee the crate is in scope. Maybe in version 0.19, the color_hex crate was reexported so it was always in scope?
|
macro_rules! hex_color { |
|
($s:literal) => {{ |
|
let array = color_hex::color_from_hex!($s); |
Trying to use the
hex_color!macro gives the following error:From what I can tell, the macro calls another macro from the
color_hexcrate, but there's no guarantee the crate is in scope. Maybe in version 0.19, thecolor_hexcrate was reexported so it was always in scope?egui/crates/ecolor/src/hex_color_macro.rs
Lines 9 to 11 in f222ee0