custom_error
custom_error copied to clipboard
Macro importing core causes compilation failure
If you have a module called core and you define it on the same level it does not work
pub mod core;
use ::core::fmt;
use custom_error::custom_error;
custom_error! { pub SomeError
Something = "hello"
}
This does not compile, it says
failed to resolve: could not find `fmt` in `core`
could not find `fmt` in `core
actual error occuring in lib.rs line 271
Indeed, our usage of core should be replaced with ::core.
Can you please make a pull request, fixing the issue and adding a test?