When trying to use the proc macro to build a map, whenever you try to mix strings and unicase strings the macro generates a compile error.
However when a unicase string matches a normal string the macro just runs forever without progressing.
I know what I tried to do is probably not supported but because the macro kept running forever it prevented the code from compiling and it took me quite a while to figure out what was happening. So it would be nice if this was fixed.
Below a minimal reproduction.
use phf::phf_map;
use unicase::UniCase;
pub(crate) static KEYWORDS: phf::Map<UniCase<&'static str>, usize> = phf_map! {
"foo" => 0,
UniCase::ascii("FOO") => 0
};
fn main(){
KEYWORDS.get("foo").unwap();
}
When trying to use the proc macro to build a map, whenever you try to mix strings and unicase strings the macro generates a compile error.
However when a unicase string matches a normal string the macro just runs forever without progressing.
I know what I tried to do is probably not supported but because the macro kept running forever it prevented the code from compiling and it took me quite a while to figure out what was happening. So it would be nice if this was fixed.
Below a minimal reproduction.