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
Describe the bug
I was working on some custom palettes, and I looked how they were made in the upstream code. It seems like define_color! is the way to do it. I tried using it myself, but the compiler complained that it couldn't access the doc! macro.
error[E0432]: unresolved import `plotters::doc`
--> src/bin/plotters.rs:7:30
|
7 | use plotters::{define_color, doc};
| ^^^ no `doc` in the root
error: cannot determine resolution for the macro `doc`
--> src/bin/plotters.rs:10:1
|
10 | define_color!(MOODY_BLUE, 255, 255, 255, "*Moody Blue*");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: import resolution is stuck, try simplifying macro imports
= note: this error originates in the macro `define_color` (in Nightly builds, run with -Z macro-backtrace for more info)
Version Information Compiling plotters v0.3.3
The fix is as easy as adding #[macro_export] on line 6
The text was updated successfully, but these errors were encountered:
Describe the bug
I was working on some custom palettes, and I looked how they were made in the upstream code. It seems like
define_color!
is the way to do it. I tried using it myself, but the compiler complained that it couldn't access thedoc!
macro.To Reproduce
Try to make a color yourself:
the compiler will complain:
Version Information
Compiling plotters v0.3.3
The fix is as easy as adding
#[macro_export]
on line 6The text was updated successfully, but these errors were encountered: