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
[package]
name = "rust_phf_issue"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
phf = { version = "0.10", features = ["macros", "unicase"] }
unicase = "2.6"
Then the code won't compile with the following error:
error: unsupported key expression
--> src/main.rs:5:4
|
5 | UniCase::ascii("FOO") => 10,
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `proc_macro_call` (in Nightly builds, run with -Z macro-backtrace for more info)
error: could not compile `rust_phf_issue` due to previous error
Workaround: change dependencies in Cargo.toml to the following:
[dependencies]
phf = { version = "0.10", features = ["macros"] }
phf_macros = { version = "0.10", features = ["unicase"] }
unicase = "2.6"
and then it compiles just fine.
I'm not sure if this is intended or not. Perhaps some sub-feature in macros does not get activated when the unicase feature in phf is enabled?
The text was updated successfully, but these errors were encountered:
It was impossible to enable them without the phf_macros as we have to enable phf_macros/unicase feature if only we use unicase + macros features on phf. But 1.60 supports weak dependency and it's possible now. I've opened #251 to support that.
Hi, consider the following
main.rs
:With
Cargo.toml
:Then the code won't compile with the following error:
Workaround: change dependencies in
Cargo.toml
to the following:and then it compiles just fine.
I'm not sure if this is intended or not. Perhaps some sub-feature in
macros
does not get activated when theunicase
feature inphf
is enabled?The text was updated successfully, but these errors were encountered: